Commit 30709434 authored by Nemo Ma's avatar Nemo Ma

0601 wd

parent c5e9522c
No preview for this file type
expansions/pics/106556909.jpg

38 KB | W: | H:

expansions/pics/106556909.jpg

159 KB | W: | H:

expansions/pics/106556909.jpg
expansions/pics/106556909.jpg
expansions/pics/106556909.jpg
expansions/pics/106556909.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/119044827.jpg

33.2 KB | W: | H:

expansions/pics/119044827.jpg

133 KB | W: | H:

expansions/pics/119044827.jpg
expansions/pics/119044827.jpg
expansions/pics/119044827.jpg
expansions/pics/119044827.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/122638495.jpg

30.4 KB | W: | H:

expansions/pics/122638495.jpg

133 KB | W: | H:

expansions/pics/122638495.jpg
expansions/pics/122638495.jpg
expansions/pics/122638495.jpg
expansions/pics/122638495.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/134079868.jpg

37.2 KB | W: | H:

expansions/pics/134079868.jpg

161 KB | W: | H:

expansions/pics/134079868.jpg
expansions/pics/134079868.jpg
expansions/pics/134079868.jpg
expansions/pics/134079868.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/field/114722253.jpg

19.7 KB | W: | H:

expansions/pics/field/114722253.jpg

220 KB | W: | H:

expansions/pics/field/114722253.jpg
expansions/pics/field/114722253.jpg
expansions/pics/field/114722253.jpg
expansions/pics/field/114722253.jpg
  • 2-up
  • Swipe
  • Onion skin
--サイクリボー --サイクリボー
function c114064005.initial_effect(c) function c114064005.initial_effect(c)
--change control --change control
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_CONTROL) e1:SetCategory(CATEGORY_CONTROL)
e1:SetType(EFFECT_TYPE_QUICK_O) e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetCode(EVENT_PRE_DAMAGE_CALCULATE) e1:SetCode(EVENT_PRE_DAMAGE_CALCULATE)
e1:SetCondition(c114064005.adcon) e1:SetCondition(c114064005.adcon)
e1:SetCost(c114064005.cost) e1:SetCost(c114064005.cost)
e1:SetTarget(c114064005.adtg) e1:SetTarget(c114064005.adtg)
e1:SetOperation(c114064005.adop) e1:SetOperation(c114064005.adop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_GRANT) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_GRANT)
e2:SetRange(LOCATION_MZONE) e2:SetRange(LOCATION_MZONE)
e2:SetTargetRange(LOCATION_MZONE,0) e2:SetTargetRange(LOCATION_MZONE,0)
e2:SetTarget(c114064005.eftg) e2:SetTarget(c114064005.eftg)
e2:SetLabelObject(e1) e2:SetLabelObject(e1)
c:RegisterEffect(e2) c:RegisterEffect(e2)
-- --
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD) e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(114064005) e3:SetCode(114064005)
e3:SetRange(LOCATION_GRAVE) e3:SetRange(LOCATION_GRAVE)
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e3:SetTargetRange(1,0) e3:SetTargetRange(1,0)
c:RegisterEffect(e3) c:RegisterEffect(e3)
--deck activate --deck activate
local e4=Effect.CreateEffect(c) local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e4:SetCode(EVENT_TO_GRAVE) e4:SetCode(EVENT_TO_GRAVE)
e4:SetCountLimit(1,114064005) e4:SetCountLimit(1,114064005)
e4:SetOperation(c114064005.operation) e4:SetOperation(c114064005.operation)
c:RegisterEffect(e4) c:RegisterEffect(e4)
--replace --replace
local e5=Effect.CreateEffect(c) local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e5:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e5:SetRange(LOCATION_DECK+LOCATION_HAND) e5:SetRange(LOCATION_DECK+LOCATION_HAND)
e5:SetCode(EFFECT_SEND_REPLACE) e5:SetCode(EFFECT_SEND_REPLACE)
e5:SetTarget(c114064005.reptg) e5:SetTarget(c114064005.reptg)
e5:SetOperation(c114064005.repop) e5:SetOperation(c114064005.repop)
e5:SetValue(c114064005.repval) e5:SetValue(c114064005.repval)
c:RegisterEffect(e5) c:RegisterEffect(e5)
--plus effect --plus effect
if not c114064005.global_check then if not c114064005.global_check then
c114064005.global_check=true c114064005.global_check=true
local ge1=Effect.CreateEffect(c) local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_ADJUST) ge1:SetCode(EVENT_ADJUST)
ge1:SetOperation(c114064005.sdop) ge1:SetOperation(c114064005.sdop)
Duel.RegisterEffect(ge1,0) Duel.RegisterEffect(ge1,0)
end end
end end
function c114064005.adcon(e,tp,eg,ep,ev,re,r,rp) function c114064005.adcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
return c==Duel.GetAttacker() or c==Duel.GetAttackTarget() return c==Duel.GetAttacker() or c==Duel.GetAttackTarget()
end end
function c114064005.cost(e,tp,eg,ep,ev,re,r,rp,chk) function c114064005.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():GetFlagEffect(114064005)==0 end if chk==0 then return e:GetHandler():GetFlagEffect(114064005)==0 end
e:GetHandler():RegisterFlagEffect(114064005,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,0,1) e:GetHandler():RegisterFlagEffect(114064005,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,0,1)
end end
function c114064005.adtg(e,tp,eg,ep,ev,re,r,rp,chk) function c114064005.adtg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
local bc=c:GetBattleTarget() local bc=c:GetBattleTarget()
if chk==0 then return bc and bc:IsOnField() and c:IsAbleToChangeControler() and bc:IsAbleToChangeControler() end if chk==0 then return bc and bc:IsOnField() and c:IsAbleToChangeControler() and bc:IsAbleToChangeControler() end
Duel.SetOperationInfo(0,CATEGORY_CONTROL,g,2,0,0) Duel.SetOperationInfo(0,CATEGORY_CONTROL,g,2,0,0)
end end
function c114064005.adop(e,tp,eg,ep,ev,re,r,rp) function c114064005.adop(e,tp,eg,ep,ev,re,r,rp)
local a=Duel.GetAttacker() local a=Duel.GetAttacker()
local at=Duel.GetAttackTarget() local at=Duel.GetAttackTarget()
if not (a:IsRelateToEffect(e) or at:IsRelateToEffect(e)) then return end if not (a:IsRelateToEffect(e) or at:IsRelateToEffect(e)) then return end
if Duel.SwapControl(a,at,RESET_PHASE+PHASE_BATTLE,1) then if Duel.SwapControl(a,at,RESET_PHASE+PHASE_BATTLE,1) then
Duel.CalculateDamage(a,at) Duel.CalculateDamage(a,at)
end end
end end
function c114064005.eftg(e,c) function c114064005.eftg(e,c)
return c:IsSetCard(0xa4) and c:IsType(TYPE_MONSTER) return c:IsSetCard(0xa4) and c:IsType(TYPE_MONSTER)
end end
function c114064005.operation(e,tp,eg,ep,ev,re,r,rp) function c114064005.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local tp=c:GetControler() local tp=c:GetControler()
if c:GetPreviousLocation()==LOCATION_DECK then Duel.ShuffleDeck(tp) end if c:GetPreviousLocation()==LOCATION_DECK then Duel.ShuffleDeck(tp) end
if Duel.IsExistingMatchingCard(c114064005.kufilter,tp,LOCATION_DECK,0,2,nil) then if Duel.IsExistingMatchingCard(c114064005.kufilter,tp,LOCATION_DECK,0,2,nil) then
local sg=Duel.GetMatchingGroup(c114064005.kufilter,tp,LOCATION_DECK,0,nil) local sg=Duel.GetMatchingGroup(c114064005.kufilter,tp,LOCATION_DECK,0,nil)
Duel.ConfirmCards(tp,sg) Duel.ConfirmCards(tp,sg)
end end
--public --public
local e0=Effect.CreateEffect(c) local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_FIELD) e0:SetType(EFFECT_TYPE_FIELD)
e0:SetCode(EFFECT_FLAG_EFFECT+114064005) e0:SetCode(EFFECT_FLAG_EFFECT+114064005)
e0:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e0:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e0:SetRange(LOCATION_GRAVE) e0:SetRange(LOCATION_GRAVE)
e0:SetTargetRange(1,0) e0:SetTargetRange(1,0)
e0:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) e0:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
c:RegisterEffect(e0) c:RegisterEffect(e0)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_TO_GRAVE) e1:SetCode(EVENT_TO_GRAVE)
e1:SetCondition(c114064005.con) e1:SetCondition(c114064005.con)
e1:SetOperation(c114064005.op) e1:SetOperation(c114064005.op)
e1:SetLabelObject(e6) e1:SetLabelObject(e6)
e1:SetReset(RESET_PHASE+PHASE_END) e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp) Duel.RegisterEffect(e1,tp)
local e2=e1:Clone() local e2=e1:Clone()
e2:SetCode(EVENT_SPSUMMON_SUCCESS) e2:SetCode(EVENT_SPSUMMON_SUCCESS)
Duel.RegisterEffect(e2,tp) Duel.RegisterEffect(e2,tp)
local e3=e1:Clone() local e3=e1:Clone()
e3:SetCode(EVENT_TO_HAND) e3:SetCode(EVENT_TO_HAND)
Duel.RegisterEffect(e3,tp) Duel.RegisterEffect(e3,tp)
local e4=e1:Clone() local e4=e1:Clone()
e4:SetCode(EVENT_TO_DECK) e4:SetCode(EVENT_TO_DECK)
Duel.RegisterEffect(e4,tp) Duel.RegisterEffect(e4,tp)
local e5=e1:Clone() local e5=e1:Clone()
e5:SetCode(EVENT_REMOVE) e5:SetCode(EVENT_REMOVE)
Duel.RegisterEffect(e5,tp) Duel.RegisterEffect(e5,tp)
local e6=Effect.CreateEffect(c) local e6=Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e6:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e6:SetCode(EVENT_CHAIN_SOLVED) e6:SetCode(EVENT_CHAIN_SOLVED)
e6:SetOperation(c114064005.pubop) e6:SetOperation(c114064005.pubop)
e6:SetReset(RESET_PHASE+PHASE_END) e6:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e6,tp) Duel.RegisterEffect(e6,tp)
end end
--public --public
function c114064005.cfilter(c,tp) function c114064005.cfilter(c,tp)
return c:GetPreviousControler()==tp return c:GetPreviousControler()==tp
and (c:IsPreviousLocation(LOCATION_DECK) or c:GetSummonLocation()==LOCATION_DECK and (c:IsPreviousLocation(LOCATION_DECK) or c:GetSummonLocation()==LOCATION_DECK
or (c:IsControler(tp) and c:IsPreviousLocation(LOCATION_DECK)) or (c:IsControler(tp) and c:IsPreviousLocation(LOCATION_DECK))
or c:IsLocation(LOCATION_DECK)) and not c:IsReason(REASON_DRAW) or c:IsLocation(LOCATION_DECK)) and not c:IsReason(REASON_DRAW)
end end
function c114064005.con(e,tp,eg,ep,ev,re,r,rp) function c114064005.con(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c114064005.cfilter,1,nil,tp) return eg:IsExists(c114064005.cfilter,1,nil,tp)
end end
function c114064005.op(e,tp,eg,ep,ev,re,r,rp) function c114064005.op(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local g=Duel.GetFieldGroup(tp,LOCATION_DECK,0) local g=Duel.GetFieldGroup(tp,LOCATION_DECK,0)
if g:GetCount()<=1 then return end if g:GetCount()<=1 then return end
c:RegisterFlagEffect(114064005,RESET_EVENT+0x1fc0000+RESET_CHAIN,0,1) c:RegisterFlagEffect(114064005,RESET_EVENT+0x1fc0000+RESET_CHAIN,0,1)
end end
function c114064005.pubop(e,tp,eg,ep,ev,re,r,rp) function c114064005.pubop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local g=Duel.GetFieldGroup(tp,LOCATION_DECK,0) local g=Duel.GetFieldGroup(tp,LOCATION_DECK,0)
if g:GetCount()<=1 then return end if g:GetCount()<=1 then return end
if c:GetFlagEffect(114064005)~=0 and Duel.IsExistingMatchingCard(c114064005.kufilter,tp,LOCATION_DECK,0,2,nil) then if c:GetFlagEffect(114064005)~=0 and Duel.IsExistingMatchingCard(c114064005.kufilter,tp,LOCATION_DECK,0,2,nil) then
local sg=Duel.GetMatchingGroup(c114064005.kufilter,tp,LOCATION_DECK,0,nil) local sg=Duel.GetMatchingGroup(c114064005.kufilter,tp,LOCATION_DECK,0,nil)
Duel.ConfirmCards(tp,sg) Duel.ConfirmCards(tp,sg)
c:ResetFlagEffect(114064005) c:ResetFlagEffect(114064005)
end end
end end
function c114064005.prfilter(c) function c114064005.prfilter(c)
return c:IsCode(114064005) and c:IsAbleToGrave() return c:IsCode(114064005) and c:IsAbleToGrave()
end end
function c114064005.repfilter(c,tp) function c114064005.repfilter(c,tp)
return c:IsControler(tp) and c:IsType(TYPE_MONSTER) and c:IsSetCard(0xa4) and not c:IsCode(114064005) return c:IsControler(tp) and c:IsType(TYPE_MONSTER) and c:IsSetCard(0xa4) and not c:IsCode(114064005)
and (c:IsLocation(LOCATION_HAND) or (c:IsLocation(LOCATION_ONFIELD) and c:IsFaceup())) and c:GetDestination()==LOCATION_GRAVE and (c:IsLocation(LOCATION_HAND) or (c:IsLocation(LOCATION_ONFIELD) and c:IsFaceup())) and c:GetDestination()==LOCATION_GRAVE
end end
function c114064005.reptg(e,tp,eg,ep,ev,re,r,rp,chk) function c114064005.reptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return eg:IsExists(c114064005.repfilter,1,nil,tp) end if chk==0 then return eg:IsExists(c114064005.repfilter,1,nil,tp) end
if not Duel.IsExistingMatchingCard(c114064005.prfilter,tp,LOCATION_DECK+LOCATION_HAND,0,1,nil) then return end if not Duel.IsExistingMatchingCard(c114064005.prfilter,tp,LOCATION_DECK+LOCATION_HAND,0,1,nil) then return end
if Duel.GetFlagEffect(tp,114064006)>0 then return end if Duel.GetFlagEffect(tp,114064006)>0 then return end
if Duel.SelectYesNo(tp,aux.Stringid(114064005,2)) then if Duel.SelectYesNo(tp,aux.Stringid(114064005,2)) then
local g=eg:Filter(c114064005.repfilter2,nil,tp) local g=eg:Filter(c114064005.repfilter2,nil,tp)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.ConfirmCards(1-tp,g) Duel.ConfirmCards(1-tp,g)
Duel.ShuffleHand(tp) Duel.ShuffleHand(tp)
end end
return true return true
else return false end else return false end
end end
function c114064005.repfilter2(c,tp) function c114064005.repfilter2(c,tp)
return c:IsControler(tp) and c:IsType(TYPE_MONSTER) and c:IsSetCard(0xa4) return c:IsControler(tp) and c:IsType(TYPE_MONSTER) and c:IsSetCard(0xa4)
and c:IsLocation(LOCATION_HAND) and c:GetDestination()==LOCATION_GRAVE and c:IsLocation(LOCATION_HAND) and c:GetDestination()==LOCATION_GRAVE
end end
function c114064005.repop(e,tp,eg,ep,ev,re,r,rp,chk) function c114064005.repop(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
local tp=c:GetControler() local tp=c:GetControler()
Duel.RegisterFlagEffect(tp,114064006,RESET_PHASE+PHASE_END,0,1) Duel.RegisterFlagEffect(tp,114064006,RESET_PHASE+PHASE_END,0,1)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local tg=Duel.SelectMatchingCard(tp,c114064005.prfilter,tp,LOCATION_DECK+LOCATION_HAND,0,1,1,nil) local tg=Duel.SelectMatchingCard(tp,c114064005.prfilter,tp,LOCATION_DECK+LOCATION_HAND,0,1,1,nil)
if tg:GetCount()>0 then if tg:GetCount()>0 then
Duel.SendtoGrave(tg,REASON_EFFECT+REASON_REPLACE) Duel.SendtoGrave(tg,REASON_EFFECT+REASON_REPLACE)
end end
end end
function c114064005.repval(e,c) function c114064005.repval(e,c)
return c114064005.repfilter(c,e:GetHandlerPlayer()) return c114064005.repfilter(c,e:GetHandlerPlayer())
end end
function c114064005.kufilter(c) function c114064005.kufilter(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP) and (c:IsCode(80831721,15471265,20065322,25573054,40703222,89086566) or c:IsSetCard(0xa4)) return c:IsType(TYPE_SPELL+TYPE_TRAP) and (c:IsCode(80831721,15471265,20065322,25573054,40703222,89086566) or c:IsSetCard(0xa4))
end end
function c114064005.kmfilter(c) function c114064005.kmfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsSetCard(0xa4) return c:IsType(TYPE_MONSTER) and c:IsSetCard(0xa4)
end end
function c114064005.sdop(e,tp,eg,ep,ev,re,r,rp) function c114064005.sdop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler():GetOwner() local c=e:GetHandler():GetOwner()
local g=Duel.GetMatchingGroup(c114064005.kufilter,c,LOCATION_DECK,LOCATION_DECK,nil) local g=Duel.GetMatchingGroup(c114064005.kufilter,c,LOCATION_DECK,LOCATION_DECK,nil)
local tc=g:GetFirst() local tc=g:GetFirst()
while tc do while tc do
if tc:GetFlagEffect(114064005)==0 then if tc:GetFlagEffect(114064005)==0 then
local code=tc:GetOriginalCode() local code=tc:GetOriginalCode()
local ae=tc:GetActivateEffect() local ae=tc:GetActivateEffect()
local e1=Effect.CreateEffect(tc) local e1=Effect.CreateEffect(tc)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(ae:GetCode()) e1:SetCode(ae:GetCode())
e1:SetCategory(ae:GetCategory()) e1:SetCategory(ae:GetCategory())
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE+ae:GetProperty()) e1:SetProperty(EFFECT_FLAG_UNCOPYABLE+ae:GetProperty())
e1:SetRange(LOCATION_DECK) e1:SetRange(LOCATION_DECK)
e1:SetCountLimit(1,code) e1:SetCountLimit(1,code)
e1:SetCondition(c114064005.sfcon) e1:SetCondition(c114064005.sfcon)
e1:SetTarget(c114064005.sftg) e1:SetTarget(c114064005.sftg)
e1:SetOperation(c114064005.sfop) e1:SetOperation(c114064005.sfop)
e1:SetReset(RESET_EVENT+0x1fe0000) e1:SetReset(RESET_EVENT+0x1fe0000)
tc:RegisterEffect(e1) tc:RegisterEffect(e1)
--activate cost --activate cost
local e2=Effect.CreateEffect(tc) local e2=Effect.CreateEffect(tc)
e2:SetType(EFFECT_TYPE_FIELD) e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_ACTIVATE_COST) e2:SetCode(EFFECT_ACTIVATE_COST)
e2:SetRange(LOCATION_DECK) e2:SetRange(LOCATION_DECK)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_UNCOPYABLE) e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_UNCOPYABLE)
e2:SetTargetRange(LOCATION_DECK,0) e2:SetTargetRange(LOCATION_DECK,0)
e2:SetCost(c114064005.costchk) e2:SetCost(c114064005.costchk)
e2:SetTarget(c114064005.costtg) e2:SetTarget(c114064005.costtg)
e2:SetOperation(c114064005.costop) e2:SetOperation(c114064005.costop)
e2:SetReset(RESET_EVENT+0x1fe0000) e2:SetReset(RESET_EVENT+0x1fe0000)
e2:SetLabel(114064005) e2:SetLabel(114064005)
tc:RegisterEffect(e2) tc:RegisterEffect(e2)
tc:RegisterFlagEffect(114064005,RESET_EVENT+0x1fe0000,0,1) tc:RegisterFlagEffect(114064005,RESET_EVENT+0x1fe0000,0,1)
end end
tc=g:GetNext() tc=g:GetNext()
end end
local kg=Duel.GetMatchingGroup(c114064005.kmfilter,c,LOCATION_DECK+LOCATION_ONFIELD+LOCATION_EXTRA+LOCATION_HAND,LOCATION_DECK+LOCATION_ONFIELD+LOCATION_EXTRA+LOCATION_HAND,nil) local kg=Duel.GetMatchingGroup(c114064005.kmfilter,c,LOCATION_DECK+LOCATION_ONFIELD+LOCATION_EXTRA+LOCATION_HAND,LOCATION_DECK+LOCATION_ONFIELD+LOCATION_EXTRA+LOCATION_HAND,nil)
local tck=kg:GetFirst() local tck=kg:GetFirst()
while tck do while tck do
if tck:GetFlagEffect(114064006)==0 then if tck:GetFlagEffect(114064006)==0 then
--spsummon --spsummon
local e1=Effect.CreateEffect(tck) local e1=Effect.CreateEffect(tck)
e1:SetDescription(aux.Stringid(114064005,1)) e1:SetDescription(aux.Stringid(114064005,1))
e1:SetCategory(CATEGORY_SPSUMMON) e1:SetCategory(CATEGORY_SPSUMMON)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_TO_GRAVE) e1:SetCode(EVENT_TO_GRAVE)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY) e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e1:SetCondition(c114064005.spcon) e1:SetCondition(c114064005.spcon)
e1:SetCost(c114064005.cost) e1:SetCost(c114064005.cost)
e1:SetTarget(c114064005.sptg) e1:SetTarget(c114064005.sptg)
e1:SetOperation(c114064005.spop) e1:SetOperation(c114064005.spop)
tck:RegisterEffect(e1) tck:RegisterEffect(e1)
tck:RegisterFlagEffect(114064006,0,0,1) tck:RegisterFlagEffect(114064006,0,0,1)
end end
tck=kg:GetNext() tck=kg:GetNext()
end end
end end
--deck activate --deck activate
function c114064005.sfcon(e,tp,eg,ep,ev,re,r,rp) function c114064005.sfcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFlagEffect(tp,114064005)>0 return Duel.GetFlagEffect(tp,114064005)>0
end end
function c114064005.sftg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c114064005.sftg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local ae=e:GetHandler():GetActivateEffect() local ae=e:GetHandler():GetActivateEffect()
local fcon=ae:GetCondition() local fcon=ae:GetCondition()
local fcos=ae:GetCost() local fcos=ae:GetCost()
local ftg=ae:GetTarget() local ftg=ae:GetTarget()
if chk==0 then if chk==0 then
return (not fcon or fcon(e,tp,eg,ep,ev,re,r,rp)) return (not fcon or fcon(e,tp,eg,ep,ev,re,r,rp))
and (not fcos or fcos(e,tp,eg,ep,ev,re,r,rp,0)) and (not fcos or fcos(e,tp,eg,ep,ev,re,r,rp,0))
and (not ftg or ftg(e,tp,eg,ep,ev,re,r,rp,0)) and (not ftg or ftg(e,tp,eg,ep,ev,re,r,rp,0))
end end
if fcos then if fcos then
fcos(e,tp,eg,ep,ev,re,r,rp,1) fcos(e,tp,eg,ep,ev,re,r,rp,1)
end end
if ftg then if ftg then
ftg(e,tp,eg,ep,ev,re,r,rp,1) ftg(e,tp,eg,ep,ev,re,r,rp,1)
end end
end end
function c114064005.sfop(e,tp,eg,ep,ev,re,r,rp) function c114064005.sfop(e,tp,eg,ep,ev,re,r,rp)
local ae=e:GetHandler():GetActivateEffect() local ae=e:GetHandler():GetActivateEffect()
local fop=ae:GetOperation() local fop=ae:GetOperation()
if fop then if fop then
fop(e,tp,eg,ep,ev,re,r,rp) fop(e,tp,eg,ep,ev,re,r,rp)
end end
end end
--activate field --activate field
function c114064005.costchk(e,te_or_c,tp) function c114064005.costchk(e,te_or_c,tp)
local tp=e:GetHandler():GetControler() local tp=e:GetHandler():GetControler()
return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 return Duel.GetLocationCount(tp,LOCATION_SZONE)>0
end end
function c114064005.costtg(e,te,tp) function c114064005.costtg(e,te,tp)
e:SetLabelObject(te) e:SetLabelObject(te)
return te:GetHandler():IsLocation(LOCATION_DECK) and te:GetHandler()==e:GetHandler() return te:GetHandler():IsLocation(LOCATION_DECK) and te:GetHandler()==e:GetHandler()
end end
function c114064005.costop(e,tp,eg,ep,ev,re,r,rp) function c114064005.costop(e,tp,eg,ep,ev,re,r,rp)
local te=e:GetLabelObject() local te=e:GetLabelObject()
local c=e:GetHandler() local c=e:GetHandler()
Duel.MoveToField(c,tp,tp,LOCATION_SZONE,POS_FACEUP,false) Duel.MoveToField(c,tp,tp,LOCATION_SZONE,POS_FACEUP,false)
c:CreateEffectRelation(te) c:CreateEffectRelation(te)
local ev0=Duel.GetCurrentChain()+1 local ev0=Duel.GetCurrentChain()+1
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e1:SetCode(EVENT_CHAIN_SOLVED) e1:SetCode(EVENT_CHAIN_SOLVED)
e1:SetCountLimit(1) e1:SetCountLimit(1)
e1:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return ev==ev0 end) e1:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return ev==ev0 end)
e1:SetOperation(c114064005.rsop) e1:SetOperation(c114064005.rsop)
e1:SetReset(RESET_CHAIN) e1:SetReset(RESET_CHAIN)
Duel.RegisterEffect(e1,tp) Duel.RegisterEffect(e1,tp)
local e2=e1:Clone() local e2=e1:Clone()
e2:SetCode(EVENT_CHAIN_NEGATED) e2:SetCode(EVENT_CHAIN_NEGATED)
Duel.RegisterEffect(e2,tp) Duel.RegisterEffect(e2,tp)
end end
function c114064005.rsop(e,tp,eg,ep,ev,re,r,rp) function c114064005.rsop(e,tp,eg,ep,ev,re,r,rp)
local rc=re:GetHandler() local rc=re:GetHandler()
if e:GetCode()==EVENT_CHAIN_SOLVED and rc:IsRelateToEffect(re) then if e:GetCode()==EVENT_CHAIN_SOLVED and rc:IsRelateToEffect(re) then
rc:SetStatus(STATUS_EFFECT_ENABLED,true) rc:SetStatus(STATUS_EFFECT_ENABLED,true)
end end
if e:GetCode()==EVENT_CHAIN_NEGATED and rc:IsRelateToEffect(re) and not (rc:IsOnField() and rc:IsFacedown()) then if e:GetCode()==EVENT_CHAIN_NEGATED and rc:IsRelateToEffect(re) and not (rc:IsOnField() and rc:IsFacedown()) then
rc:SetStatus(STATUS_ACTIVATE_DISABLED,true) rc:SetStatus(STATUS_ACTIVATE_DISABLED,true)
end end
end end
function c114064005.spcon(e,tp,eg,ep,ev,re,r,rp) function c114064005.spcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
return not c:IsReason(REASON_LINK) and (c:IsPreviousLocation(LOCATION_HAND) or c:IsPreviousLocation(LOCATION_ONFIELD)) return not c:IsReason(REASON_LINK) and (c:IsPreviousLocation(LOCATION_HAND) or c:IsPreviousLocation(LOCATION_ONFIELD))
end end
function c114064005.spfilter(c,e,tp,code) function c114064005.spfilter(c,e,tp,code)
return c:IsSetCard(0xa4) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and not c:IsCode(code) return c:IsSetCard(0xa4) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and not c:IsCode(code)
end end
function c114064005.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c114064005.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
local code=c:GetOriginalCode() local code=c:GetOriginalCode()
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c114064005.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp,code) and Duel.IsExistingMatchingCard(c114064005.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp,code)
and Duel.IsPlayerAffectedByEffect(tp,114064005) end and Duel.IsPlayerAffectedByEffect(tp,114064005) end
Duel.Hint(HINT_OPSELECTED,1-tp,aux.Stringid(114064005,1)) Duel.Hint(HINT_OPSELECTED,1-tp,aux.Stringid(114064005,1))
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end end
function c114064005.spop(e,tp,eg,ep,ev,re,r,rp) function c114064005.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local code=c:GetOriginalCode() local code=c:GetOriginalCode()
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c114064005.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp,code) local g=Duel.SelectMatchingCard(tp,c114064005.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp,code)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0) e1:SetTargetRange(1,0)
e1:SetTarget(c114064005.sumlimit) e1:SetTarget(c114064005.sumlimit)
e1:SetLabel(g:GetFirst():GetCode()) e1:SetLabel(g:GetFirst():GetCode())
e1:SetReset(RESET_PHASE+PHASE_END) e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp) Duel.RegisterEffect(e1,tp)
end end
end end
function c114064005.sumlimit(e,c) function c114064005.sumlimit(e,c)
return c:IsCode(e:GetLabel()) return c:IsCode(e:GetLabel())
end end
local re=Card.RegisterEffect local re=Card.RegisterEffect
Card.RegisterEffect=function(c,e) Card.RegisterEffect=function(c,e)
if c114064005.kufilter(c) and c:IsType(TYPE_CONTINUOUS+TYPE_EQUIP+TYPE_FIELD) and not e:IsHasType(EFFECT_TYPE_ACTIVATE) and e:GetLabel()~=114064005 then if c114064005.kufilter(c) and c:IsType(TYPE_CONTINUOUS+TYPE_EQUIP+TYPE_FIELD) and not e:IsHasType(EFFECT_TYPE_ACTIVATE) and e:GetLabel()~=114064005 then
local tg=e:GetTarget() local tg=e:GetTarget()
if not tg then tg=aux.TRUE end if not tg then tg=aux.TRUE end
e:SetTarget(function(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return tg(e,tp,eg,ep,ev,re,r,rp,0) and not c:IsStatus(STATUS_CHAINING) end tg(e,tp,eg,ep,ev,re,r,rp,1) end) e:SetTarget(function(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return tg(e,tp,eg,ep,ev,re,r,rp,0) and not c:IsStatus(STATUS_CHAINING) end tg(e,tp,eg,ep,ev,re,r,rp,1) end)
end end
re(c,e) re(c,e)
end end
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