Commit bdf86afd authored by argon.sun's avatar argon.sun

new

parent b9cf0c18
#include "duelclient.h"
#include "client_card.h"
#include "materials.h"
#include "image_manager.h"
#include "../ocgcore/field.h"
#include "../ocgcore/duel.h"
#include "game.h"
......@@ -391,6 +392,13 @@ void DuelClient::HandleSTOCPacketLan(char* data, unsigned int len) {
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->btnBP->setVisible(false);
mainGame->btnM2->setVisible(false);
mainGame->btnEP->setVisible(false);
mainGame->imgCard->setImage(imageManager.tCover);
mainGame->device->setEventReceiver(&mainGame->dField);
if(selftype > 1) {
mainGame->dInfo.isObserver = true;
......@@ -2298,7 +2306,7 @@ int DuelClient::ClientAnalyze(char* msg, unsigned int len) {
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 < 22; ++i, filter <<= 1) {
for(int i = 0, filter = 0x1; i < 23; ++i, filter <<= 1) {
mainGame->chkRace[i]->setChecked(false);
if(filter & available)
mainGame->chkRace[i]->setVisible(true);
......
......@@ -643,7 +643,7 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
}
case CHECK_RACE: {
int rac = 0, filter = 0x1, count = 0;
for(int i = 0; i < 22; ++i, filter <<= 1) {
for(int i = 0; i < 23; ++i, filter <<= 1) {
if(mainGame->chkRace[i]->isChecked()) {
rac |= filter;
count++;
......
......@@ -13,7 +13,7 @@
#include <dirent.h>
#endif
const unsigned short PRO_VERSION = 0x1022;
const unsigned short PRO_VERSION = 0x1023;
namespace ygo {
......@@ -310,7 +310,7 @@ bool Game::Initialize() {
wANRace = env->addWindow(rect<s32>(480, 200, 850, 385), false, dataManager.GetSysString(563));
wANRace->getCloseButton()->setVisible(false);
wANRace->setVisible(false);
for(int filter = 0x1, i = 0; i < 22; filter <<= 1, ++i)
for(int filter = 0x1, i = 0; i < 23; filter <<= 1, ++i)
chkRace[i] = env->addCheckBox(false, rect<s32>(10 + (i % 4) * 90, 25 + (i / 4) * 25, 100 + (i % 4) * 90, 50 + (i / 4) * 25),
wANRace, CHECK_RACE, dataManager.FormatRace(filter));
//selection hint
......
......@@ -258,7 +258,7 @@ public:
irr::gui::IGUICheckBox* chkAttribute[7];
//announce race
irr::gui::IGUIWindow* wANRace;
irr::gui::IGUICheckBox* chkRace[22];
irr::gui::IGUICheckBox* chkRace[23];
//cmd menu
irr::gui::IGUIWindow* wCmdMenu;
irr::gui::IGUIButton* btnActivate;
......
......@@ -122,6 +122,7 @@ void SingleDuel::JoinGame(DuelPlayer* dp, void* pdata, bool is_creater) {
}
void SingleDuel::LeaveGame(DuelPlayer* dp) {
if(dp == host_player) {
EndDuel();
NetServer::StopServer();
} else if(dp->type == NETPLAYER_TYPE_OBSERVER) {
observers.erase(dp);
......
......@@ -303,7 +303,7 @@ public:
#define RACE_REPTILE 0x80000 //
#define RACE_PSYCHO 0x100000 //
#define RACE_DEVINE 0x200000 //
#define RACE_RESERVE 0x400000 //
#define RACE_CREATORGOD 0x400000 //
//Reason
#define REASON_DESTROY 0x1 //
#define REASON_RELEASE 0x2 //
......
......@@ -571,7 +571,7 @@ int32 field::sort_card(int16 step, uint8 playerid, uint8 is_chain) {
int32 field::announce_race(int16 step, uint8 playerid, int32 count, int32 available) {
if(step == 0) {
int32 scount = 0;
for(int32 ft = 0x1; ft != 0x400000; ft <<= 1) {
for(int32 ft = 0x1; ft != 0x800000; ft <<= 1) {
if(ft & available)
scount++;
}
......@@ -587,7 +587,7 @@ int32 field::announce_race(int16 step, uint8 playerid, int32 count, int32 availa
} else {
int32 rc = returns.ivalue[0];
int32 sel = 0;
for(int32 ft = 0x1; ft != 0x400000; ft <<= 1) {
for(int32 ft = 0x1; ft != 0x800000; ft <<= 1) {
if(!(ft & rc)) continue;
if(!(ft & available)) {
pduel->write_buffer8(MSG_RETRY);
......
--光の創造神 ホルアクティ
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)
--win
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e4:SetCode(EVENT_SPSUMMON_SUCCESS)
e4:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e4:SetOperation(c10000040.winop)
c:RegisterEffect(e4)
end
function c10000040.spfilter(c,code)
return c:GetOriginalCode()==code
end
function c10000040.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
return 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)
end
function c10000040.winop(e,tp,eg,ep,ev,re,r,rp)
local WIN_REASON_CREATORGOD = 0x13
Duel.Win(e:GetHandler():GetSummonPlayer(),WIN_REASON_CREATORGOD)
end
--仮面魔道士
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
--幻影の壁
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()
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,0,REASON_EFFECT)
end
--¥Ø¥ë¡¤¥Æ¥ó¥Ú¥¹¥È
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
--ライフチェンジャー
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
--昼夜の大火事
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
--レインボー·フラワー
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
--スクリーチ
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 Duel.IsExistingMatchingCard(c27655513.filter,tp,LOCATION_DECK,0,2,nil) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,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()<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
--プリーステス·オーム
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
--異形の従者
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
--召喚制限-猛突するモンスター
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)
if not e:GetHandler():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(e:GetHandler())
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
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
--サイバー·シャーク
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)
if c==nil then return true end
return c:GetLevel()>4 and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c32393580.ntfilter,c:GetControler(),LOCATION_MZONE,0,1,nil)
end
--人造人間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
--エターナル·ドレッド
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
--ロードランナー
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
--つり天井
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,0)+Duel.GetFieldGroupCount(1-tp,LOCATION_MZONE,0)>=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
--封魔一閃
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
--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(c41517968.splimit)
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_DESTROY)
e4:SetTarget(c41517968.destg)
e4:SetOperation(c41517968.desop)
c:RegisterEffect(e4)
end
c41517968.material_count=2
c41517968.material={20721928,89252153}
function c41517968.splimit(e,se,sp,st)
return bit.band(st,SUMMON_TYPE_FUSION)==SUMMON_TYPE_FUSION
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:IsAttack() 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
--ブラック·マジシャンズ·ナイト
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
--ドレッド·ドラゴン
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,e,tp)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
--ハンター·アウル
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:SetCondition(c51962254.atcon)
e1:SetValue(1)
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
--女王の影武者
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
--ナイトメア·ホース
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
--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(c60493189.splimit)
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
c60493189.material_count=2
c60493189.material={20721928,59793705}
function c60493189.splimit(e,se,sp,st)
return bit.band(st,SUMMON_TYPE_FUSION)==SUMMON_TYPE_FUSION
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:IsAttack() 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:IsAttack() and tc:IsRelateToEffect(e) then
Duel.Destroy(tc,REASON_EFFECT)
end
end
--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(c61204971.splimit)
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
c61204971.material_count=2
c61204971.material={20721928,84327329}
function c61204971.splimit(e,se,sp,st)
return bit.band(st,SUMMON_TYPE_FUSION)==SUMMON_TYPE_FUSION
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()<atk and c:IsDestructable()
end
function c61204971.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and c61204971.filter(chkc,e:GetHandler():GetAttack()) end
if chk==0 then return Duel.IsExistingTarget(c61204971.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil,e:GetHandler():GetAttack()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,c61204971.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil,e:GetHandler():GetAttack())
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function c61204971.desop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if c:IsRelateToEffect(e) and c:IsFaceup() and tc:IsFaceup() and tc:IsRelateToEffect(e)
and tc:GetBaseAttack()<c:GetAttack() then
Duel.Destroy(tc,REASON_EFFECT)
end
end
--ダーク·ホルス·ドラゴン
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)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c66214679.filter(chkc) 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
--磁石の戦士マグネット·バルキリオン
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():IsReleaseable() 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
--火之迦具土
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:SetProperty(EFFECT_FLAG_REPEAT)
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
--八俣大蛇
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:SetProperty(EFFECT_FLAG_REPEAT)
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)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
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
--竜の尖兵
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 chkc:IsControler(tp) 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
--大盤振舞侍
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)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,1-tp,1)
end
function c77379481.operation(e,tp,eg,ep,ev,re,r,rp)
local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER)
if Duel.GetFieldGroupCount(p,LOCATION_HAND,0)<7 then
Duel.Draw(p,7-Duel.GetFieldGroupCount(p,LOCATION_HAND,0),REASON_EFFECT)
end
end
--猛進する剣角獣
function c79870141.initial_effect(c)
--pierce
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_PIERCE)
c:RegisterEffect(e1)
end
--D-HERO ドゥームガイ
function c80714121.initial_effect(c)
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(c80714121.regop)
e1:SetOperation(c80744121.regop)
c:RegisterEffect(e1)
end
function c80714121.regop(e,tp,eg,ep,ev,re,r,rp)
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(80714121,0))
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(c80714121.spcon)
e1:SetTarget(c80714121.sptg)
e1:SetOperation(c80714121.spop)
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 c80714121.spcon(e,tp,eg,ep,ev,re,r,rp)
function c80744121.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==tp
end
function c80714121.spfilter(c,e,tp)
return c:IsSetCard(0xc008) and c:GetCode()~=80714121 and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
function c80744121.spfilter(c,e,tp)
return c:IsSetCard(0xc008) and c:GetCode()~=80744121 and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c80714121.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c80714121.spfilter(chkc,e,tp) 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,c80714121.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
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 c80714121.spop(e,tp,eg,ep,ev,re,r,rp)
function c80744121.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)
......
--共闘するランドスターの剣士
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
--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
--騎士の称号
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.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
......@@ -72,9 +72,10 @@ function c87902575.retop(e,tp,eg,ep,ev,re,r,rp)
local lg=e:GetLabelObject():GetLabelObject()
local g=lg:Filter(c87902575.retfilter,nil,e:GetHandler(),p)
lg:Sub(g)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
local ft=Duel.GetLocationCount(p,LOCATION_MZONE)
if g:GetCount()>ft then
local sg=g
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(87902575,2))
g=g:Select(p,ft,ft,nil)
sg:Sub(g)
Duel.SendtoGrave(sg,REASON_EFFECT)
......
--ポリノシス
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.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 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,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0)
end
function c91078716.activate1(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateSummon(eg:GetFirst())
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.IsChainInactivatable(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
--ダーク·クルセイダー
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
--リミッター·ブレイク
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:SetCondition(c92450185.thcon)
e1:SetTarget(c92450185.thtg)
e1:SetOperation(c92450185.thop)
c:RegisterEffect(e1)
end
function c92450185.thcon(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsReason(REASON_RETURN)
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
--スプレンディッド·ローズ
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)
return Duel.GetTurnPlayer()==tp and 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)
e1:SetValue(c:GetBaseAttack()*2)
e1:SetReset(RESET_EVENT+0x1ff0000+RESET_PHASE+PHASE_END)
c:RegisterEffect(e1)
end
......@@ -73,6 +73,7 @@ RACE_SEASERPENT =0x40000 --
RACE_REPTILE =0x80000 --
RACE_PSYCHO =0x100000 --
RACE_DEVINE =0x200000 --
RACE_CREATORGOD =0x400000 --
--Reason
REASON_DESTROY =0x1 --
REASON_RELEASE =0x2 --
......
......@@ -360,6 +360,7 @@
!victory 0x10 封印されしエクゾディア
!victory 0x11 終焉のカウントダウン
!victory 0x12 毒蛇神ヴェノミナーガ
!victory 0x13 光の創造神 ホルアクティ
#counters
!counter 0x3001 魔力指示物
!counter 0x2 楔指示物
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment