Commit 723fe978 authored by DailyShana's avatar DailyShana

fix

parent b21a32e0
...@@ -392,10 +392,10 @@ function c13331639.pencon(e,tp,eg,ep,ev,re,r,rp) ...@@ -392,10 +392,10 @@ function c13331639.pencon(e,tp,eg,ep,ev,re,r,rp)
return c:IsPreviousLocation(LOCATION_MZONE) and c:IsFaceup() return c:IsPreviousLocation(LOCATION_MZONE) and c:IsFaceup()
end end
function c13331639.pentg(e,tp,eg,ep,ev,re,r,rp,chk) function c13331639.pentg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckLocation(tp,LOCATION_SZONE,6) or Duel.CheckLocation(tp,LOCATION_SZONE,7) end if chk==0 then return Duel.CheckLocation(tp,LOCATION_PZONE,0) or Duel.CheckLocation(tp,LOCATION_PZONE,1) end
end end
function c13331639.penop(e,tp,eg,ep,ev,re,r,rp) function c13331639.penop(e,tp,eg,ep,ev,re,r,rp)
if not Duel.CheckLocation(tp,LOCATION_SZONE,6) and not Duel.CheckLocation(tp,LOCATION_SZONE,7) then return false end if not Duel.CheckLocation(tp,LOCATION_PZONE,0) and not Duel.CheckLocation(tp,LOCATION_PZONE,1) then return false end
local c=e:GetHandler() local c=e:GetHandler()
if c:IsRelateToEffect(e) then if c:IsRelateToEffect(e) then
Duel.MoveToField(c,tp,tp,LOCATION_SZONE,POS_FACEUP,true) Duel.MoveToField(c,tp,tp,LOCATION_SZONE,POS_FACEUP,true)
......
...@@ -15,7 +15,7 @@ function c14733538.filter(c,e,tp,b1,setcode) ...@@ -15,7 +15,7 @@ function c14733538.filter(c,e,tp,b1,setcode)
and (b1 or c:IsCanBeSpecialSummoned(e,0,tp,false,false)) and (b1 or c:IsCanBeSpecialSummoned(e,0,tp,false,false))
end end
function c14733538.target(e,tp,eg,ep,ev,re,r,rp,chk) function c14733538.target(e,tp,eg,ep,ev,re,r,rp,chk)
local b1=Duel.CheckLocation(tp,LOCATION_SZONE,6) or Duel.CheckLocation(tp,LOCATION_SZONE,7) local b1=Duel.CheckLocation(tp,LOCATION_PZONE,0) or Duel.CheckLocation(tp,LOCATION_PZONE,1)
local b2=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 local b2=Duel.GetLocationCount(tp,LOCATION_MZONE)>0
if chk==0 then return (b1 or b2) if chk==0 then return (b1 or b2)
and Duel.IsExistingMatchingCard(c14733538.filter,tp,LOCATION_DECK,0,1,nil,e,tp,b1,0xc7) and Duel.IsExistingMatchingCard(c14733538.filter,tp,LOCATION_DECK,0,1,nil,e,tp,b1,0xc7)
...@@ -23,7 +23,7 @@ function c14733538.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -23,7 +23,7 @@ function c14733538.target(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,0,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,0,tp,LOCATION_DECK)
end end
function c14733538.activate(e,tp,eg,ep,ev,re,r,rp) function c14733538.activate(e,tp,eg,ep,ev,re,r,rp)
local b1=Duel.CheckLocation(tp,LOCATION_SZONE,6) or Duel.CheckLocation(tp,LOCATION_SZONE,7) local b1=Duel.CheckLocation(tp,LOCATION_PZONE,0) or Duel.CheckLocation(tp,LOCATION_PZONE,1)
local b2=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 local b2=Duel.GetLocationCount(tp,LOCATION_MZONE)>0
if not b1 and not b2 then return end if not b1 and not b2 then return end
local g1=Duel.GetMatchingGroup(c14733538.filter,tp,LOCATION_DECK,0,nil,e,tp,b1,0xc7) local g1=Duel.GetMatchingGroup(c14733538.filter,tp,LOCATION_DECK,0,nil,e,tp,b1,0xc7)
......
...@@ -60,14 +60,11 @@ end ...@@ -60,14 +60,11 @@ end
function c14756848.desfilter1(c) function c14756848.desfilter1(c)
return c:GetSequence()<5 return c:GetSequence()<5
end end
function c14756848.desfilter2(c)
return (c:GetSequence()==6 or c:GetSequence()==7)
end
function c14756848.destg(e,tp,eg,ep,ev,re,r,rp,chk) function c14756848.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then if chk==0 then
local sel=0 local sel=0
if Duel.IsExistingMatchingCard(c14756848.desfilter1,tp,0,LOCATION_SZONE,1,nil) then sel=sel+1 end 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 if Duel.GetFieldGroupCount(tp,0,LOCATION_PZONE)>0 then sel=sel+2 end
e:SetLabel(sel) e:SetLabel(sel)
return sel~=0 return sel~=0
end end
...@@ -84,7 +81,7 @@ function c14756848.destg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -84,7 +81,7 @@ function c14756848.destg(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(c14756848.desfilter1,tp,0,LOCATION_SZONE,nil) local g=Duel.GetMatchingGroup(c14756848.desfilter1,tp,0,LOCATION_SZONE,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
else else
local g=Duel.GetMatchingGroup(c14756848.desfilter2,tp,0,LOCATION_SZONE,nil) local g=Duel.GetFieldGroup(tp,0,LOCATION_PZONE)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end end
end end
...@@ -106,12 +103,12 @@ function c14756848.desop(e,tp,eg,ep,ev,re,r,rp) ...@@ -106,12 +103,12 @@ function c14756848.desop(e,tp,eg,ep,ev,re,r,rp)
end end
else else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectMatchingCard(tp,c14756848.desfilter2,tp,0,LOCATION_SZONE,1,1,nil) local g=Duel.GetFieldGroup(tp,0,LOCATION_PZONE):Select(tp,1,1,nil)
local tc=g:GetFirst() local tc=g:GetFirst()
if not tc then return end if not tc then return end
Duel.HintSelection(g) Duel.HintSelection(g)
if Duel.Destroy(g,REASON_EFFECT)~=0 if Duel.Destroy(g,REASON_EFFECT)~=0
and (Duel.CheckLocation(tp,LOCATION_SZONE,6) or Duel.CheckLocation(tp,LOCATION_SZONE,7)) and (Duel.CheckLocation(tp,LOCATION_PZONE,0) or Duel.CheckLocation(tp,LOCATION_PZONE,1))
and not tc:IsLocation(LOCATION_HAND+LOCATION_DECK) and not tc:IsForbidden() and not tc:IsLocation(LOCATION_HAND+LOCATION_DECK) and not tc:IsForbidden()
and Duel.SelectYesNo(tp,aux.Stringid(14756848,4)) then and Duel.SelectYesNo(tp,aux.Stringid(14756848,4)) then
Duel.BreakEffect() Duel.BreakEffect()
......
...@@ -30,7 +30,7 @@ function c14920218.initial_effect(c) ...@@ -30,7 +30,7 @@ function c14920218.initial_effect(c)
end end
function c14920218.pcon(e,tp,eg,ep,ev,re,r,rp) function c14920218.pcon(e,tp,eg,ep,ev,re,r,rp)
local seq=e:GetHandler():GetSequence() local seq=e:GetHandler():GetSequence()
local tc=Duel.GetFieldCard(tp,LOCATION_SZONE,13-seq) local tc=Duel.GetFieldCard(tp,LOCATION_PZONE,({1,0,0,0,0,0,1,0})[seq+1])
return tc and tc:IsSetCard(0x98) return tc and tc:IsSetCard(0x98)
end end
function c14920218.pfilter(c) function c14920218.pfilter(c)
......
...@@ -18,7 +18,7 @@ function c15146890.initial_effect(c) ...@@ -18,7 +18,7 @@ function c15146890.initial_effect(c)
end end
function c15146890.condition(e,tp,eg,ep,ev,re,r,rp) function c15146890.condition(e,tp,eg,ep,ev,re,r,rp)
local seq=e:GetHandler():GetSequence() local seq=e:GetHandler():GetSequence()
local tc=Duel.GetFieldCard(tp,LOCATION_SZONE,13-seq) local tc=Duel.GetFieldCard(tp,LOCATION_PZONE,({1,0,0,0,0,0,1,0})[seq+1])
return tc and tc:IsSetCard(0x98) return tc and tc:IsSetCard(0x98)
end end
function c15146890.cfilter(c) function c15146890.cfilter(c)
......
...@@ -22,20 +22,17 @@ function c15582767.initial_effect(c) ...@@ -22,20 +22,17 @@ function c15582767.initial_effect(c)
e2:SetLabel(1) e2:SetLabel(1)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c15582767.filter(c)
return (c:GetSequence()==6 or c:GetSequence()==7)
end
function c15582767.target1(e,tp,eg,ep,ev,re,r,rp,chk,chkc) 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 chkc then return chkc:IsLocation(LOCATION_PZONE) and chkc:IsControler(tp) end
if chk==0 then return true end if chk==0 then return true end
if Duel.GetFlagEffect(tp,15582767)==0 and Duel.IsPlayerCanDraw(tp,1) if Duel.GetFlagEffect(tp,15582767)==0 and Duel.IsPlayerCanDraw(tp,1)
and Duel.IsExistingTarget(c15582767.filter,tp,LOCATION_SZONE,0,1,nil) and Duel.IsExistingTarget(nil,tp,LOCATION_PZONE,0,1,nil)
and Duel.SelectYesNo(tp,94) then and Duel.SelectYesNo(tp,94) then
e:SetCategory(CATEGORY_DESTROY+CATEGORY_DRAW) e:SetCategory(CATEGORY_DESTROY+CATEGORY_DRAW)
e:SetProperty(EFFECT_FLAG_CARD_TARGET) e:SetProperty(EFFECT_FLAG_CARD_TARGET)
Duel.RegisterFlagEffect(tp,15582767,RESET_PHASE+PHASE_END,0,1) Duel.RegisterFlagEffect(tp,15582767,RESET_PHASE+PHASE_END,0,1)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,c15582767.filter,tp,LOCATION_SZONE,0,1,1,nil) local g=Duel.SelectTarget(tp,nil,tp,LOCATION_PZONE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
e:SetLabel(1) e:SetLabel(1)
...@@ -50,11 +47,11 @@ function c15582767.cost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -50,11 +47,11 @@ function c15582767.cost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.RegisterFlagEffect(tp,15582767,RESET_PHASE+PHASE_END,0,1) Duel.RegisterFlagEffect(tp,15582767,RESET_PHASE+PHASE_END,0,1)
end end
function c15582767.target2(e,tp,eg,ep,ev,re,r,rp,chk,chkc) 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 chkc then return chkc:IsLocation(LOCATION_PZONE) and chkc:IsControler(tp) end
if chk==0 then return Duel.IsPlayerCanDraw(tp,1) if chk==0 then return Duel.IsPlayerCanDraw(tp,1)
and Duel.IsExistingTarget(c15582767.filter,tp,LOCATION_SZONE,0,1,nil) end and Duel.IsExistingTarget(nil,tp,LOCATION_PZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,c15582767.filter,tp,LOCATION_SZONE,0,1,1,nil) local g=Duel.SelectTarget(tp,nil,tp,LOCATION_PZONE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end end
......
...@@ -27,14 +27,11 @@ end ...@@ -27,14 +27,11 @@ end
function c15936370.pencon(e,tp,eg,ep,ev,re,r,rp) function c15936370.pencon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFieldGroupCount(tp,LOCATION_EXTRA,0)==0 return Duel.GetFieldGroupCount(tp,LOCATION_EXTRA,0)==0
end end
function c15936370.desfilter(c)
return (c:GetSequence()==6 or c:GetSequence()==7)
end
function c15936370.pentg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c15936370.pentg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_SZONE) and chkc:IsControler(1-tp) and c15936370.desfilter(chkc) end if chkc then return chkc:IsLocation(LOCATION_PZONE) and chkc:IsControler(1-tp) end
if chk==0 then return Duel.IsExistingTarget(c15936370.desfilter,tp,0,LOCATION_SZONE,1,nil) end if chk==0 then return Duel.IsExistingTarget(nil,tp,0,LOCATION_PZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,c15936370.desfilter,tp,0,LOCATION_SZONE,1,1,nil) local g=Duel.SelectTarget(tp,nil,tp,0,LOCATION_PZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end end
function c15936370.penop(e,tp,eg,ep,ev,re,r,rp) function c15936370.penop(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -20,13 +20,13 @@ function c15978426.filter(c,tohand) ...@@ -20,13 +20,13 @@ function c15978426.filter(c,tohand)
end end
function c15978426.tgtg(e,tp,eg,ep,ev,re,r,rp,chk) function c15978426.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then if chk==0 then
local tohand=Duel.GetFieldCard(tp,LOCATION_SZONE,6) and Duel.GetFieldCard(tp,LOCATION_SZONE,7) local tohand=Duel.GetFieldCard(tp,LOCATION_PZONE,0) and Duel.GetFieldCard(tp,LOCATION_PZONE,1)
return Duel.IsExistingMatchingCard(c15978426.filter,tp,LOCATION_DECK,0,1,nil,tohand) return Duel.IsExistingMatchingCard(c15978426.filter,tp,LOCATION_DECK,0,1,nil,tohand)
end end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK)
end end
function c15978426.tgop(e,tp,eg,ep,ev,re,r,rp) 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) local tohand=Duel.GetFieldCard(tp,LOCATION_PZONE,0) and Duel.GetFieldCard(tp,LOCATION_PZONE,1)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c15978426.filter,tp,LOCATION_DECK,0,1,1,nil,tohand) local g=Duel.SelectMatchingCard(tp,c15978426.filter,tp,LOCATION_DECK,0,1,1,nil,tohand)
local tc=g:GetFirst() local tc=g:GetFirst()
......
...@@ -45,7 +45,7 @@ function c17330916.initial_effect(c) ...@@ -45,7 +45,7 @@ function c17330916.initial_effect(c)
end end
function c17330916.sccon(e) function c17330916.sccon(e)
local seq=e:GetHandler():GetSequence() local seq=e:GetHandler():GetSequence()
local tc=Duel.GetFieldCard(e:GetHandlerPlayer(),LOCATION_SZONE,13-seq) local tc=Duel.GetFieldCard(e:GetHandlerPlayer(),LOCATION_PZONE,({1,0,0,0,0,0,1,0})[seq+1])
return not tc or not tc:IsSetCard(0x9f) return not tc or not tc:IsSetCard(0x9f)
end end
function c17330916.reg(e,tp,eg,ep,ev,re,r,rp,chk) function c17330916.reg(e,tp,eg,ep,ev,re,r,rp,chk)
......
...@@ -58,7 +58,7 @@ function c17979378.atkop(e,tp,eg,ep,ev,re,r,rp) ...@@ -58,7 +58,7 @@ function c17979378.atkop(e,tp,eg,ep,ev,re,r,rp)
end end
function c17979378.sccon(e) function c17979378.sccon(e)
local seq=e:GetHandler():GetSequence() local seq=e:GetHandler():GetSequence()
local tc=Duel.GetFieldCard(e:GetHandlerPlayer(),LOCATION_SZONE,13-seq) local tc=Duel.GetFieldCard(e:GetHandlerPlayer(),LOCATION_PZONE,({1,0,0,0,0,0,1,0})[seq+1])
return not tc or not tc:IsSetCard(0xaf) return not tc or not tc:IsSetCard(0xaf)
end end
function c17979378.filter(c) function c17979378.filter(c)
......
...@@ -29,7 +29,7 @@ function c18239909.tgfilter(c) ...@@ -29,7 +29,7 @@ function c18239909.tgfilter(c)
if c:IsLocation(LOCATION_MZONE) then if c:IsLocation(LOCATION_MZONE) then
return c:IsFaceup() and c:IsType(TYPE_PENDULUM) return c:IsFaceup() and c:IsType(TYPE_PENDULUM)
else else
return c:GetSequence()==6 or c:GetSequence()==7 return c:IsLocation(LOCATION_PZONE)
end end
end end
function c18239909.desfilter(c) function c18239909.desfilter(c)
......
...@@ -41,7 +41,7 @@ function c20281581.initial_effect(c) ...@@ -41,7 +41,7 @@ function c20281581.initial_effect(c)
end end
function c20281581.descon(e) function c20281581.descon(e)
local seq=e:GetHandler():GetSequence() local seq=e:GetHandler():GetSequence()
local tc=Duel.GetFieldCard(e:GetHandlerPlayer(),LOCATION_SZONE,13-seq) local tc=Duel.GetFieldCard(e:GetHandlerPlayer(),LOCATION_PZONE,({1,0,0,0,0,0,1,0})[seq+1])
return not tc return not tc
end end
function c20281581.rdcon(e,tp,eg,ep,ev,re,r,rp) function c20281581.rdcon(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -70,7 +70,7 @@ function c20409757.slcon(e) ...@@ -70,7 +70,7 @@ function c20409757.slcon(e)
return not tc or (not tc:IsSetCard(0x98) and not tc:IsSetCard(0x99)) return not tc or (not tc:IsSetCard(0x98) and not tc:IsSetCard(0x99))
end end
function c20409757.filter(c,tp) function c20409757.filter(c,tp)
return c:IsControler(tp) and c:IsLocation(LOCATION_SZONE) and (c:GetSequence()==6 or c:GetSequence()==7) return c:IsControler(tp) and c:IsLocation(LOCATION_PZONE)
and c:IsReason(REASON_EFFECT) and c:GetReasonPlayer()==1-tp and c:IsReason(REASON_EFFECT) and c:GetReasonPlayer()==1-tp
end end
function c20409757.indtg(e,tp,eg,ep,ev,re,r,rp,chk) function c20409757.indtg(e,tp,eg,ep,ev,re,r,rp,chk)
......
...@@ -33,7 +33,7 @@ function c20773176.filter(c,tp) ...@@ -33,7 +33,7 @@ function c20773176.filter(c,tp)
and (c:IsSetCard(0xb4) or c:IsSetCard(0xc4)) and not c:IsCode(20773176) and (c:IsSetCard(0xb4) or c:IsSetCard(0xc4)) and not c:IsCode(20773176)
and c:GetPreviousControler()==tp and c:GetPreviousControler()==tp
and ((c:IsPreviousLocation(LOCATION_MZONE) and c:IsPreviousPosition(POS_FACEUP)) and ((c:IsPreviousLocation(LOCATION_MZONE) and c:IsPreviousPosition(POS_FACEUP))
or (c:IsPreviousLocation(LOCATION_SZONE) and (c:GetPreviousSequence()==6 or c:GetPreviousSequence()==7))) or c:IsPreviousLocation(LOCATION_PZONE))
end end
function c20773176.condition(e,tp,eg,ep,ev,re,r,rp) function c20773176.condition(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c20773176.filter,1,nil,tp) return eg:IsExists(c20773176.filter,1,nil,tp)
......
...@@ -69,12 +69,7 @@ function c22200403.initial_effect(c) ...@@ -69,12 +69,7 @@ function c22200403.initial_effect(c)
c:RegisterEffect(e8) c:RegisterEffect(e8)
end end
function c22200403.effcon(e) function c22200403.effcon(e)
local ct=0 return Duel.GetFieldGroup(0,LOCATION_PZONE,LOCATION_PZONE)>=e:GetLabel()
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 end
function c22200403.destg(e,tp,eg,ep,ev,re,r,rp,chk) function c22200403.destg(e,tp,eg,ep,ev,re,r,rp,chk)
local tc=e:GetHandler():GetBattleTarget() local tc=e:GetHandler():GetBattleTarget()
......
...@@ -138,10 +138,10 @@ function c22211622.pencon(e,tp,eg,ep,ev,re,r,rp) ...@@ -138,10 +138,10 @@ function c22211622.pencon(e,tp,eg,ep,ev,re,r,rp)
return c:IsPreviousLocation(LOCATION_MZONE) and c:IsFaceup() return c:IsPreviousLocation(LOCATION_MZONE) and c:IsFaceup()
end end
function c22211622.pentg(e,tp,eg,ep,ev,re,r,rp,chk) function c22211622.pentg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckLocation(tp,LOCATION_SZONE,6) or Duel.CheckLocation(tp,LOCATION_SZONE,7) end if chk==0 then return Duel.CheckLocation(tp,LOCATION_PZONE,0) or Duel.CheckLocation(tp,LOCATION_PZONE,1) end
end end
function c22211622.penop(e,tp,eg,ep,ev,re,r,rp) function c22211622.penop(e,tp,eg,ep,ev,re,r,rp)
if not Duel.CheckLocation(tp,LOCATION_SZONE,6) and not Duel.CheckLocation(tp,LOCATION_SZONE,7) then return end if not Duel.CheckLocation(tp,LOCATION_PZONE,0) and not Duel.CheckLocation(tp,LOCATION_PZONE,1) then return end
local c=e:GetHandler() local c=e:GetHandler()
if c:IsRelateToEffect(e) then if c:IsRelateToEffect(e) then
Duel.MoveToField(c,tp,tp,LOCATION_SZONE,POS_FACEUP,true) Duel.MoveToField(c,tp,tp,LOCATION_SZONE,POS_FACEUP,true)
......
...@@ -37,19 +37,17 @@ function c22617205.condition(e,tp,eg,ep,ev,re,r,rp) ...@@ -37,19 +37,17 @@ function c22617205.condition(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetSummonType()==SUMMON_TYPE_PENDULUM return e:GetHandler():GetSummonType()==SUMMON_TYPE_PENDULUM
end end
function c22617205.filter1(c) function c22617205.filter1(c)
return ((c:IsLocation(LOCATION_MZONE) and c:IsFaceup()) return c:IsFaceup() and (c:IsSetCard(0x9c) or c:IsSetCard(0xc4))
or (c:IsLocation(LOCATION_SZONE) and (c:GetSequence()==6 or c:GetSequence()==7)))
and (c:IsSetCard(0x9c) or c:IsSetCard(0xc4))
end end
function c22617205.filter2(c) function c22617205.filter2(c)
return c:IsFacedown() return c:IsFacedown()
end end
function c22617205.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c22617205.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return false end if chkc then return false end
if chk==0 then return Duel.IsExistingTarget(c22617205.filter1,tp,LOCATION_ONFIELD,0,1,e:GetHandler()) if chk==0 then return Duel.IsExistingTarget(c22617205.filter1,tp,LOCATION_MZONE+LOCATION_PZONE,0,1,e:GetHandler())
and Duel.IsExistingTarget(c22617205.filter2,tp,0,LOCATION_ONFIELD,1,nil) end and Duel.IsExistingTarget(c22617205.filter2,tp,0,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g1=Duel.SelectTarget(tp,c22617205.filter1,tp,LOCATION_ONFIELD,0,1,1,e:GetHandler()) local g1=Duel.SelectTarget(tp,c22617205.filter1,tp,LOCATION_MZONE+LOCATION_PZONE,0,1,1,e:GetHandler())
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g2=Duel.SelectTarget(tp,c22617205.filter2,tp,0,LOCATION_ONFIELD,1,1,nil) local g2=Duel.SelectTarget(tp,c22617205.filter2,tp,0,LOCATION_ONFIELD,1,1,nil)
g1:Merge(g2) g1:Merge(g2)
......
...@@ -92,5 +92,5 @@ function c22638495.spop2(e,tp,eg,ep,ev,re,r,rp) ...@@ -92,5 +92,5 @@ function c22638495.spop2(e,tp,eg,ep,ev,re,r,rp)
end end
end end
function c22638495.indtg(e,c) function c22638495.indtg(e,c)
return c:IsType(TYPE_PENDULUM) and (c:IsLocation(LOCATION_MZONE) or (c:GetSequence()==6 or c:GetSequence()==7)) return c:IsType(TYPE_PENDULUM) and c:IsLocation(LOCATION_MZONE+LOCATION_PZONE)
end end
...@@ -55,13 +55,13 @@ function c23377694.spcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -55,13 +55,13 @@ function c23377694.spcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c23377694.cfilter,1,nil,tp) return eg:IsExists(c23377694.cfilter,1,nil,tp)
end end
function c23377694.spfilter(c,e,tp) function c23377694.spfilter(c,e,tp)
return (c:IsSetCard(0x9f) or c:IsSetCard(0x99)) and (c:GetSequence()==6 or c:GetSequence()==7) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return (c:IsSetCard(0x9f) or c:IsSetCard(0x99)) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function c23377694.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c23377694.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_SZONE) and c23377694.spfilter(chkc,e,tp) end if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_PZONE) and c23377694.spfilter(chkc,e,tp) end
if chk==0 then return Duel.IsExistingTarget(c23377694.spfilter,tp,LOCATION_SZONE,0,1,nil,e,tp) end if chk==0 then return Duel.IsExistingTarget(c23377694.spfilter,tp,LOCATION_PZONE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c23377694.spfilter,tp,LOCATION_SZONE,0,1,1,nil,e,tp) local g=Duel.SelectTarget(tp,c23377694.spfilter,tp,LOCATION_PZONE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end end
function c23377694.spop(e,tp,eg,ep,ev,re,r,rp) function c23377694.spop(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -19,8 +19,8 @@ function c2359348.condition(e,tp,eg,ep,ev,re,r,rp) ...@@ -19,8 +19,8 @@ function c2359348.condition(e,tp,eg,ep,ev,re,r,rp)
end end
function c2359348.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c2359348.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return false end if chkc then return false end
local tc1=Duel.GetFieldCard(tp,LOCATION_SZONE,6) local tc1=Duel.GetFieldCard(tp,LOCATION_PZONE,0)
local tc2=Duel.GetFieldCard(tp,LOCATION_SZONE,7) local tc2=Duel.GetFieldCard(tp,LOCATION_PZONE,1)
if chk==0 then return tc1 and tc2 if chk==0 then return tc1 and tc2
and tc1:IsCanBeEffectTarget(e) and tc2:IsCanBeEffectTarget(e) end and tc1:IsCanBeEffectTarget(e) and tc2:IsCanBeEffectTarget(e) end
local g=Group.FromCards(tc1,tc2) local g=Group.FromCards(tc1,tc2)
......
...@@ -14,7 +14,7 @@ function c24019092.initial_effect(c) ...@@ -14,7 +14,7 @@ function c24019092.initial_effect(c)
end end
function c24019092.thcon(e,tp,eg,ep,ev,re,r,rp) function c24019092.thcon(e,tp,eg,ep,ev,re,r,rp)
local seq=e:GetHandler():GetSequence() local seq=e:GetHandler():GetSequence()
local pc=Duel.GetFieldCard(tp,LOCATION_SZONE,13-seq) local pc=Duel.GetFieldCard(tp,LOCATION_PZONE,({1,0,0,0,0,0,1,0})[seq+1])
return pc and pc:IsSetCard(0xc8) return pc and pc:IsSetCard(0xc8)
end end
function c24019092.filter(c) function c24019092.filter(c)
...@@ -22,7 +22,7 @@ function c24019092.filter(c) ...@@ -22,7 +22,7 @@ function c24019092.filter(c)
end end
function c24019092.thtg(e,tp,eg,ep,ev,re,r,rp,chk) function c24019092.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
local pc=Duel.GetFieldCard(tp,LOCATION_SZONE,13-c:GetSequence()) local pc=Duel.GetFieldCard(tp,LOCATION_PZONE,({1,0,0,0,0,0,1,0})[c:GetSequence()+1])
if chk==0 then return Duel.IsExistingMatchingCard(c24019092.filter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(c24019092.filter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end
local g=Group.FromCards(c,pc) local g=Group.FromCards(c,pc)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,2,0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,2,0,0)
...@@ -31,7 +31,7 @@ end ...@@ -31,7 +31,7 @@ end
function c24019092.thop(e,tp,eg,ep,ev,re,r,rp) function c24019092.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end if not c:IsRelateToEffect(e) then return end
local pc=Duel.GetFieldCard(tp,LOCATION_SZONE,13-c:GetSequence()) local pc=Duel.GetFieldCard(tp,LOCATION_PZONE,({1,0,0,0,0,0,1,0})[c:GetSequence()+1])
if not pc then return end if not pc then return end
local dg=Group.FromCards(c,pc) local dg=Group.FromCards(c,pc)
if Duel.Destroy(dg,REASON_EFFECT)~=2 then return end if Duel.Destroy(dg,REASON_EFFECT)~=2 then return end
......
...@@ -14,7 +14,7 @@ function c24131534.initial_effect(c) ...@@ -14,7 +14,7 @@ function c24131534.initial_effect(c)
end end
function c24131534.thcon(e,tp,eg,ep,ev,re,r,rp) function c24131534.thcon(e,tp,eg,ep,ev,re,r,rp)
local seq=e:GetHandler():GetSequence() local seq=e:GetHandler():GetSequence()
local pc=Duel.GetFieldCard(tp,LOCATION_SZONE,13-seq) local pc=Duel.GetFieldCard(tp,LOCATION_PZONE,({1,0,0,0,0,0,1,0})[seq+1])
return pc and pc:IsSetCard(0xc8) return pc and pc:IsSetCard(0xc8)
end end
function c24131534.filter(c) function c24131534.filter(c)
...@@ -22,7 +22,7 @@ function c24131534.filter(c) ...@@ -22,7 +22,7 @@ function c24131534.filter(c)
end end
function c24131534.thtg(e,tp,eg,ep,ev,re,r,rp,chk) function c24131534.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
local pc=Duel.GetFieldCard(tp,LOCATION_SZONE,13-c:GetSequence()) local pc=Duel.GetFieldCard(tp,LOCATION_PZONE,({1,0,0,0,0,0,1,0})[c:GetSequence()+1])
if chk==0 then return Duel.IsExistingMatchingCard(c24131534.filter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(c24131534.filter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end
local g=Group.FromCards(c,pc) local g=Group.FromCards(c,pc)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,2,0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,2,0,0)
...@@ -31,7 +31,7 @@ end ...@@ -31,7 +31,7 @@ end
function c24131534.thop(e,tp,eg,ep,ev,re,r,rp) function c24131534.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end if not c:IsRelateToEffect(e) then return end
local pc=Duel.GetFieldCard(tp,LOCATION_SZONE,13-c:GetSequence()) local pc=Duel.GetFieldCard(tp,LOCATION_PZONE,({1,0,0,0,0,0,1,0})[c:GetSequence()+1])
if not pc then return end if not pc then return end
local dg=Group.FromCards(c,pc) local dg=Group.FromCards(c,pc)
if Duel.Destroy(dg,REASON_EFFECT)~=2 then return end if Duel.Destroy(dg,REASON_EFFECT)~=2 then return end
......
...@@ -42,14 +42,14 @@ function c26638543.initial_effect(c) ...@@ -42,14 +42,14 @@ function c26638543.initial_effect(c)
c:RegisterEffect(e5) c:RegisterEffect(e5)
end end
function c26638543.scfilter(c,pc) function c26638543.scfilter(c,pc)
return (c:GetSequence()==6 or c:GetSequence()==7) and c:GetLeftScale()~=pc:GetLeftScale() return c:GetLeftScale()~=pc:GetLeftScale()
end end
function c26638543.sctg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c26638543.sctg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler() local c=e:GetHandler()
if chkc then return chkc:IsLocation(LOCATION_SZONE) and c26638543.scfilter(chkc,c) and chkc~=c end if chkc then return chkc:IsLocation(LOCATION_PZONE) and c26638543.scfilter(chkc,c) and chkc~=c end
if chk==0 then return Duel.IsExistingTarget(c26638543.scfilter,tp,LOCATION_SZONE,LOCATION_SZONE,1,c,c) end if chk==0 then return Duel.IsExistingTarget(c26638543.scfilter,tp,LOCATION_PZONE,LOCATION_PZONE,1,c,c) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
Duel.SelectTarget(tp,c26638543.scfilter,tp,LOCATION_SZONE,LOCATION_SZONE,1,1,c,c) Duel.SelectTarget(tp,c26638543.scfilter,tp,LOCATION_PZONE,LOCATION_PZONE,1,1,c,c)
end end
function c26638543.scop(e,tp,eg,ep,ev,re,r,rp) function c26638543.scop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
...@@ -70,28 +70,25 @@ function c26638543.scop(e,tp,eg,ep,ev,re,r,rp) ...@@ -70,28 +70,25 @@ function c26638543.scop(e,tp,eg,ep,ev,re,r,rp)
end end
function c26638543.con(e) function c26638543.con(e)
local tp=e:GetHandler():GetControler() local tp=e:GetHandler():GetControler()
local tc1=Duel.GetFieldCard(tp,LOCATION_SZONE,6) local tc1=Duel.GetFieldCard(tp,LOCATION_PZONE,0)
local tc2=Duel.GetFieldCard(tp,LOCATION_SZONE,7) local tc2=Duel.GetFieldCard(tp,LOCATION_PZONE,1)
if not tc1 or not tc2 then return false end if not tc1 or not tc2 then return false end
return tc1:GetLeftScale()==tc2:GetRightScale() return tc1:GetLeftScale()==tc2:GetRightScale()
end end
function c26638543.val(e,c) function c26638543.val(e,c)
local tc=Duel.GetFieldCard(c:GetControler(),LOCATION_SZONE,6) local tc=Duel.GetFieldCard(c:GetControler(),LOCATION_PZONE,0)
return tc:GetLeftScale()*100 return tc:GetLeftScale()*100
end end
function c26638543.descon(e,tp,eg,ep,ev,re,r,rp) function c26638543.descon(e,tp,eg,ep,ev,re,r,rp)
return ep~=tp and Duel.GetAttackTarget()==nil return ep~=tp and Duel.GetAttackTarget()==nil
end end
function c26638543.desfilter(c)
return c:GetSequence()==6 or c:GetSequence()==7
end
function c26638543.destg(e,tp,eg,ep,ev,re,r,rp,chk) function c26638543.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return true end
local g=Duel.GetMatchingGroup(c26638543.desfilter,tp,LOCATION_SZONE,LOCATION_SZONE,nil) local g=Duel.GetFieldGroup(tp,LOCATION_PZONE,LOCATION_PZONE)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0)
end end
function c26638543.desop(e,tp,eg,ep,ev,re,r,rp) function c26638543.desop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c26638543.desfilter,tp,LOCATION_SZONE,LOCATION_SZONE,nil) local g=Duel.GetFieldGroup(tp,LOCATION_PZONE,LOCATION_PZONE)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.Destroy(g,REASON_EFFECT) Duel.Destroy(g,REASON_EFFECT)
end end
......
...@@ -11,7 +11,7 @@ function c27813661.initial_effect(c) ...@@ -11,7 +11,7 @@ function c27813661.initial_effect(c)
e2:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET) e2:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e2:SetRange(LOCATION_FZONE) e2:SetRange(LOCATION_FZONE)
e2:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) e2:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e2:SetTargetRange(LOCATION_SZONE,0) e2:SetTargetRange(LOCATION_PZONE,0)
e2:SetTarget(c27813661.tgtg) e2:SetTarget(c27813661.tgtg)
e2:SetValue(aux.tgoval) e2:SetValue(aux.tgoval)
c:RegisterEffect(e2) c:RegisterEffect(e2)
...@@ -28,8 +28,7 @@ function c27813661.initial_effect(c) ...@@ -28,8 +28,7 @@ function c27813661.initial_effect(c)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
function c27813661.tgtg(e,c) function c27813661.tgtg(e,c)
return (c:IsSetCard(0x98) or c:IsSetCard(0x9f) or c:IsSetCard(0x99)) return c:IsSetCard(0x98) or c:IsSetCard(0x9f) or c:IsSetCard(0x99)
and (c:GetSequence()==6 or c:GetSequence()==7)
end end
function c27813661.desfilter(c) function c27813661.desfilter(c)
return c:IsFaceup() return c:IsFaceup()
......
...@@ -46,8 +46,7 @@ function c29432356.initial_effect(c) ...@@ -46,8 +46,7 @@ function c29432356.initial_effect(c)
end end
function c29432356.scfilter(c,pc) function c29432356.scfilter(c,pc)
return c:IsType(TYPE_PENDULUM) and c:IsSetCard(0xc4) and not c:IsForbidden() return c:IsType(TYPE_PENDULUM) and c:IsSetCard(0xc4) and not c:IsForbidden()
and ((pc:GetSequence()==6 and c:GetLeftScale()~=pc:GetLeftScale()) and c:GetLeftScale()~=pc:GetLeftScale()
or (pc:GetSequence()==7 and c:GetRightScale()~=pc:GetRightScale()))
end end
function c29432356.sctg(e,tp,eg,ep,ev,re,r,rp,chk) function c29432356.sctg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c29432356.scfilter,tp,LOCATION_DECK,0,1,nil,e:GetHandler()) end if chk==0 then return Duel.IsExistingMatchingCard(c29432356.scfilter,tp,LOCATION_DECK,0,1,nil,e:GetHandler()) end
...@@ -92,8 +91,8 @@ function c29432356.penop(e,tp,eg,ep,ev,re,r,rp) ...@@ -92,8 +91,8 @@ function c29432356.penop(e,tp,eg,ep,ev,re,r,rp)
e1:SetReset(RESET_PHASE+PHASE_END) e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp) Duel.RegisterEffect(e1,tp)
c29432356.checkop(e,tp) c29432356.checkop(e,tp)
local olpz=Duel.GetFieldCard(1-tp,LOCATION_SZONE,6) local olpz=Duel.GetFieldCard(1-tp,LOCATION_PZONE,0)
local orpz=Duel.GetFieldCard(1-tp,LOCATION_SZONE,7) local orpz=Duel.GetFieldCard(1-tp,LOCATION_PZONE,1)
if olpz~=nil and orpz~=nil and olpz:GetFlagEffectLabel(31531170)==orpz:GetFieldID() if olpz~=nil and orpz~=nil and olpz:GetFlagEffectLabel(31531170)==orpz:GetFieldID()
and orpz:GetFlagEffectLabel(31531170)==olpz:GetFieldID() then and orpz:GetFlagEffectLabel(31531170)==olpz:GetFieldID() then
local e2=Effect.CreateEffect(e:GetHandler()) local e2=Effect.CreateEffect(e:GetHandler())
...@@ -112,7 +111,7 @@ function c29432356.penop(e,tp,eg,ep,ev,re,r,rp) ...@@ -112,7 +111,7 @@ function c29432356.penop(e,tp,eg,ep,ev,re,r,rp)
end end
end end
function c29432356.checkop(e,tp) function c29432356.checkop(e,tp)
local lpz=Duel.GetFieldCard(tp,LOCATION_SZONE,6) local lpz=Duel.GetFieldCard(tp,LOCATION_PZONE,0)
if lpz==nil or lpz:GetFlagEffect(29432356)>0 then return end if lpz==nil or lpz:GetFlagEffect(29432356)>0 then return end
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetDescription(aux.Stringid(29432356,2)) e1:SetDescription(aux.Stringid(29432356,2))
...@@ -143,7 +142,7 @@ function c29432356.pencon1(e,c,og) ...@@ -143,7 +142,7 @@ function c29432356.pencon1(e,c,og)
if c==nil then return true end if c==nil then return true end
local tp=c:GetControler() local tp=c:GetControler()
if c:GetSequence()~=6 then return false end if c:GetSequence()~=6 then return false end
local rpz=Duel.GetFieldCard(tp,LOCATION_SZONE,7) local rpz=Duel.GetFieldCard(tp,LOCATION_PZONE,1)
if rpz==nil then return false end if rpz==nil then return false end
local lscale=c:GetLeftScale() local lscale=c:GetLeftScale()
local rscale=rpz:GetRightScale() local rscale=rpz:GetRightScale()
...@@ -158,7 +157,7 @@ function c29432356.pencon1(e,c,og) ...@@ -158,7 +157,7 @@ function c29432356.pencon1(e,c,og)
end end
function c29432356.penop1(e,tp,eg,ep,ev,re,r,rp,c,sg,og) function c29432356.penop1(e,tp,eg,ep,ev,re,r,rp,c,sg,og)
Duel.Hint(HINT_CARD,0,29432356) Duel.Hint(HINT_CARD,0,29432356)
local rpz=Duel.GetFieldCard(tp,LOCATION_SZONE,7) local rpz=Duel.GetFieldCard(tp,LOCATION_PZONE,1)
local lscale=c:GetLeftScale() local lscale=c:GetLeftScale()
local rscale=rpz:GetRightScale() local rscale=rpz:GetRightScale()
if lscale>rscale then lscale,rscale=rscale,lscale end if lscale>rscale then lscale,rscale=rscale,lscale end
...@@ -199,7 +198,7 @@ end ...@@ -199,7 +198,7 @@ end
function c29432356.pencon2(e,c,og) function c29432356.pencon2(e,c,og)
if c==nil then return true end if c==nil then return true end
local tp=e:GetOwnerPlayer() local tp=e:GetOwnerPlayer()
local rpz=Duel.GetFieldCard(1-tp,LOCATION_SZONE,7) local rpz=Duel.GetFieldCard(1-tp,LOCATION_PZONE,1)
if rpz==nil or rpz:GetFieldID()~=c:GetFlagEffectLabel(31531170) then return false end if rpz==nil or rpz:GetFieldID()~=c:GetFlagEffectLabel(31531170) then return false end
local lscale=c:GetLeftScale() local lscale=c:GetLeftScale()
local rscale=rpz:GetRightScale() local rscale=rpz:GetRightScale()
...@@ -216,7 +215,7 @@ function c29432356.penop2(e,tp,eg,ep,ev,re,r,rp,c,sg,og) ...@@ -216,7 +215,7 @@ function c29432356.penop2(e,tp,eg,ep,ev,re,r,rp,c,sg,og)
Duel.Hint(HINT_CARD,0,31531170) Duel.Hint(HINT_CARD,0,31531170)
Duel.Hint(HINT_CARD,0,29432356) Duel.Hint(HINT_CARD,0,29432356)
local tp=e:GetOwnerPlayer() local tp=e:GetOwnerPlayer()
local rpz=Duel.GetFieldCard(1-tp,LOCATION_SZONE,7) local rpz=Duel.GetFieldCard(1-tp,LOCATION_PZONE,1)
local lscale=c:GetLeftScale() local lscale=c:GetLeftScale()
local rscale=rpz:GetRightScale() local rscale=rpz:GetRightScale()
if lscale>rscale then lscale,rscale=rscale,lscale end if lscale>rscale then lscale,rscale=rscale,lscale end
......
...@@ -9,12 +9,9 @@ function c31222701.initial_effect(c) ...@@ -9,12 +9,9 @@ function c31222701.initial_effect(c)
e1:SetOperation(c31222701.activate) e1:SetOperation(c31222701.activate)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c31222701.filter(c)
return (c:GetSequence()==6 or c:GetSequence()==7)
end
function c31222701.target(e,tp,eg,ep,ev,re,r,rp,chk) 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 if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_PZONE,LOCATION_PZONE)>0 end
local g=Duel.GetMatchingGroup(c31222701.filter,tp,LOCATION_SZONE,LOCATION_SZONE,nil) local g=Duel.GetFieldGroup(tp,LOCATION_PZONE,LOCATION_PZONE)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,500) Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,500)
end end
...@@ -25,7 +22,7 @@ function c31222701.thfilter2(c) ...@@ -25,7 +22,7 @@ function c31222701.thfilter2(c)
return c:IsCode(31222701) and c:IsAbleToHand() return c:IsCode(31222701) and c:IsAbleToHand()
end end
function c31222701.activate(e,tp,eg,ep,ev,re,r,rp) function c31222701.activate(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c31222701.filter,tp,LOCATION_SZONE,LOCATION_SZONE,nil) local g=Duel.GetFieldGroup(tp,LOCATION_PZONE,LOCATION_PZONE)
local ct=Duel.Destroy(g,REASON_EFFECT) local ct=Duel.Destroy(g,REASON_EFFECT)
if ct>=1 then if ct>=1 then
Duel.BreakEffect() Duel.BreakEffect()
......
...@@ -11,15 +11,15 @@ function c31531170.initial_effect(c) ...@@ -11,15 +11,15 @@ function c31531170.initial_effect(c)
end end
function c31531170.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c31531170.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return false end if chkc then return false end
local tc1=Duel.GetFieldCard(1-tp,LOCATION_SZONE,6) local tc1=Duel.GetFieldCard(1-tp,LOCATION_PZONE,0)
local tc2=Duel.GetFieldCard(1-tp,LOCATION_SZONE,7) local tc2=Duel.GetFieldCard(1-tp,LOCATION_PZONE,1)
if chk==0 then return tc1 and tc2 and tc1:IsCanBeEffectTarget(e) and tc2:IsCanBeEffectTarget(e) end if chk==0 then return tc1 and tc2 and tc1:IsCanBeEffectTarget(e) and tc2:IsCanBeEffectTarget(e) end
local g=Group.FromCards(tc1,tc2) local g=Group.FromCards(tc1,tc2)
Duel.SetTargetCard(g) Duel.SetTargetCard(g)
end end
function c31531170.activate(e,tp,eg,ep,ev,re,r,rp) function c31531170.activate(e,tp,eg,ep,ev,re,r,rp)
local tc1=Duel.GetFieldCard(1-tp,LOCATION_SZONE,6) local tc1=Duel.GetFieldCard(1-tp,LOCATION_PZONE,0)
local tc2=Duel.GetFieldCard(1-tp,LOCATION_SZONE,7) local tc2=Duel.GetFieldCard(1-tp,LOCATION_PZONE,1)
if not tc1:IsRelateToEffect(e) or not tc2:IsRelateToEffect(e) then return end if not tc1:IsRelateToEffect(e) or not tc2:IsRelateToEffect(e) then return end
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetDescription(1163) e1:SetDescription(1163)
...@@ -39,7 +39,7 @@ end ...@@ -39,7 +39,7 @@ end
function c31531170.pendcon(e,c,og) function c31531170.pendcon(e,c,og)
if c==nil then return true end if c==nil then return true end
local tp=e:GetOwnerPlayer() local tp=e:GetOwnerPlayer()
local rpz=Duel.GetFieldCard(1-tp,LOCATION_SZONE,7) local rpz=Duel.GetFieldCard(1-tp,LOCATION_PZONE,1)
if rpz==nil or rpz:GetFieldID()~=c:GetFlagEffectLabel(31531170) then return false end if rpz==nil or rpz:GetFieldID()~=c:GetFlagEffectLabel(31531170) then return false end
local lscale=c:GetLeftScale() local lscale=c:GetLeftScale()
local rscale=rpz:GetRightScale() local rscale=rpz:GetRightScale()
...@@ -55,7 +55,7 @@ end ...@@ -55,7 +55,7 @@ end
function c31531170.pendop(e,tp,eg,ep,ev,re,r,rp,c,sg,og) function c31531170.pendop(e,tp,eg,ep,ev,re,r,rp,c,sg,og)
Duel.Hint(HINT_CARD,0,31531170) Duel.Hint(HINT_CARD,0,31531170)
local tp=e:GetOwnerPlayer() local tp=e:GetOwnerPlayer()
local rpz=Duel.GetFieldCard(1-tp,LOCATION_SZONE,7) local rpz=Duel.GetFieldCard(1-tp,LOCATION_PZONE,1)
local lscale=c:GetLeftScale() local lscale=c:GetLeftScale()
local rscale=rpz:GetRightScale() local rscale=rpz:GetRightScale()
if lscale>rscale then lscale,rscale=rscale,lscale end if lscale>rscale then lscale,rscale=rscale,lscale end
......
...@@ -52,11 +52,11 @@ function c33656832.spcon2(e,tp,eg,ep,ev,re,r,rp) ...@@ -52,11 +52,11 @@ function c33656832.spcon2(e,tp,eg,ep,ev,re,r,rp)
return re:IsHasType(EFFECT_TYPE_ACTIVATE) return re:IsHasType(EFFECT_TYPE_ACTIVATE)
end end
function c33656832.pentg(e,tp,eg,ep,ev,re,r,rp,chk) function c33656832.pentg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckLocation(tp,LOCATION_SZONE,6) or Duel.CheckLocation(tp,LOCATION_SZONE,7) end if chk==0 then return Duel.CheckLocation(tp,LOCATION_PZONE,0) or Duel.CheckLocation(tp,LOCATION_PZONE,1) end
end end
function c33656832.penop(e,tp,eg,ep,ev,re,r,rp) function c33656832.penop(e,tp,eg,ep,ev,re,r,rp)
if e:GetHandler():IsRelateToEffect(e) if e:GetHandler():IsRelateToEffect(e)
and (Duel.CheckLocation(tp,LOCATION_SZONE,6) or Duel.CheckLocation(tp,LOCATION_SZONE,7)) then and (Duel.CheckLocation(tp,LOCATION_PZONE,0) or Duel.CheckLocation(tp,LOCATION_PZONE,1)) then
Duel.MoveToField(e:GetHandler(),tp,tp,LOCATION_SZONE,POS_FACEUP,true) Duel.MoveToField(e:GetHandler(),tp,tp,LOCATION_SZONE,POS_FACEUP,true)
end end
end end
...@@ -11,11 +11,8 @@ function c37469904.initial_effect(c) ...@@ -11,11 +11,8 @@ function c37469904.initial_effect(c)
e1:SetOperation(c37469904.activate) e1:SetOperation(c37469904.activate)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c37469904.cfilter(c)
return c:GetSequence()==6 or c:GetSequence()==7
end
function c37469904.condition(e,tp,eg,ep,ev,re,r,rp) function c37469904.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c37469904.cfilter,tp,LOCATION_SZONE,LOCATION_SZONE,1,nil) return Duel.GetFieldGroupCount(tp,LOCATION_PZONE,LOCATION_PZONE)>0
end end
function c37469904.filter(c) function c37469904.filter(c)
return c:IsSetCard(0xf2) and c:IsType(TYPE_PENDULUM+TYPE_SPELL+TYPE_TRAP) and c:IsAbleToHand() return c:IsSetCard(0xf2) and c:IsType(TYPE_PENDULUM+TYPE_SPELL+TYPE_TRAP) and c:IsAbleToHand()
......
...@@ -11,7 +11,7 @@ function c37803970.initial_effect(c) ...@@ -11,7 +11,7 @@ function c37803970.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c37803970.condition(e,tp,eg,ep,ev,re,r,rp) function c37803970.condition(e,tp,eg,ep,ev,re,r,rp)
return not Duel.GetFieldCard(tp,LOCATION_SZONE,6) and not Duel.GetFieldCard(tp,LOCATION_SZONE,7) return not Duel.GetFieldCard(tp,LOCATION_PZONE,0) and not Duel.GetFieldCard(tp,LOCATION_PZONE,1)
end end
function c37803970.thfilter(c) function c37803970.thfilter(c)
return c:IsFaceup() and c:IsSetCard(0x98) and c:IsType(TYPE_PENDULUM) and c:IsAbleToHand() return c:IsFaceup() and c:IsSetCard(0x98) and c:IsType(TYPE_PENDULUM) and c:IsAbleToHand()
......
...@@ -50,8 +50,8 @@ function c39024589.thop(e,tp,eg,ep,ev,re,r,rp) ...@@ -50,8 +50,8 @@ function c39024589.thop(e,tp,eg,ep,ev,re,r,rp)
end end
end end
function c39024589.spcon(e,tp,eg,ep,ev,re,r,rp) function c39024589.spcon(e,tp,eg,ep,ev,re,r,rp)
local tc1=Duel.GetFieldCard(tp,LOCATION_SZONE,6) local tc1=Duel.GetFieldCard(tp,LOCATION_PZONE,0)
local tc2=Duel.GetFieldCard(tp,LOCATION_SZONE,7) local tc2=Duel.GetFieldCard(tp,LOCATION_PZONE,1)
return tc1 and tc1:IsSetCard(0x10ec) and tc2 and tc2:IsSetCard(0x10ec) return tc1 and tc1:IsSetCard(0x10ec) and tc2 and tc2:IsSetCard(0x10ec)
end end
function c39024589.spcost(e,tp,eg,ep,ev,re,r,rp,chk) function c39024589.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
......
...@@ -41,18 +41,18 @@ function c41546.thop(e,tp,eg,ep,ev,re,r,rp) ...@@ -41,18 +41,18 @@ function c41546.thop(e,tp,eg,ep,ev,re,r,rp)
end end
end end
function c41546.desfilter(c) function c41546.desfilter(c)
return (c:GetSequence()==6 or c:GetSequence()==7) and c:IsSetCard(0xaf) return c:IsSetCard(0xaf)
end end
function c41546.spfilter(c,e,tp) function c41546.spfilter(c,e,tp)
return c:IsSetCard(0x10af) and c:GetLevel()==8 and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) return c:IsSetCard(0x10af) and c:GetLevel()==8 and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE)
end end
function c41546.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c41546.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_SZONE) and chkc:IsControler(tp) and c41546.desfilter(chkc) end if chkc then return chkc:IsLocation(LOCATION_PZONE) and chkc:IsControler(tp) and c41546.desfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c41546.desfilter,tp,LOCATION_SZONE,0,1,nil) if chk==0 then return Duel.IsExistingTarget(c41546.desfilter,tp,LOCATION_PZONE,0,1,nil)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c41546.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end and Duel.IsExistingMatchingCard(c41546.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,c41546.desfilter,tp,LOCATION_SZONE,0,1,1,nil) local g=Duel.SelectTarget(tp,c41546.desfilter,tp,LOCATION_PZONE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end end
......
...@@ -84,7 +84,7 @@ end ...@@ -84,7 +84,7 @@ end
function c42002073.spcon(e,tp,eg,ep,ev,re,r,rp) function c42002073.spcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
return c:IsPreviousLocation(LOCATION_SZONE) and (c:GetPreviousSequence()==6 or c:GetPreviousSequence()==7) return c:IsPreviousLocation(LOCATION_PZONE)
end end
function c42002073.spfilter(c,e,tp) function c42002073.spfilter(c,e,tp)
return c:IsType(TYPE_FUSION) and c:IsRace(RACE_DRAGON) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsType(TYPE_FUSION) and c:IsRace(RACE_DRAGON) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
......
...@@ -33,13 +33,13 @@ function c43241495.thcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -33,13 +33,13 @@ function c43241495.thcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c43241495.cfilter,1,nil,tp) return eg:IsExists(c43241495.cfilter,1,nil,tp)
end end
function c43241495.filter(c) function c43241495.filter(c)
return (c:GetSequence()==6 or c:GetSequence()==7) and c:IsAbleToHand() return c:IsAbleToHand()
end end
function c43241495.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) 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 chkc then return chkc:IsLocation(LOCATION_PZONE) and c43241495.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c43241495.filter,tp,LOCATION_SZONE,LOCATION_SZONE,1,nil) end if chk==0 then return Duel.IsExistingTarget(c43241495.filter,tp,LOCATION_PZONE,LOCATION_PZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g=Duel.SelectTarget(tp,c43241495.filter,tp,LOCATION_SZONE,LOCATION_SZONE,1,1,nil) local g=Duel.SelectTarget(tp,c43241495.filter,tp,LOCATION_PZONE,LOCATION_PZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
end end
function c43241495.thop1(e,tp,eg,ep,ev,re,r,rp) function c43241495.thop1(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -66,14 +66,11 @@ function c45591967.descost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -66,14 +66,11 @@ function c45591967.descost(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToRemoveAsCost,tp,LOCATION_EXTRA,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,Card.IsAbleToRemoveAsCost,tp,LOCATION_EXTRA,0,1,1,nil)
Duel.Remove(g,POS_FACEUP,REASON_COST) Duel.Remove(g,POS_FACEUP,REASON_COST)
end end
function c45591967.desfilter(c)
return (c:GetSequence()==6 or c:GetSequence()==7)
end
function c45591967.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c45591967.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_SZONE) and c45591967.desfilter(chkc) end if chkc then return chkc:IsLocation(LOCATION_PZONE) end
if chk==0 then return Duel.IsExistingTarget(c45591967.desfilter,tp,LOCATION_SZONE,LOCATION_SZONE,1,nil) end if chk==0 then return Duel.IsExistingTarget(nil,tp,LOCATION_PZONE,LOCATION_PZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,c45591967.desfilter,tp,LOCATION_SZONE,LOCATION_SZONE,1,1,nil) local g=Duel.SelectTarget(tp,nil,tp,LOCATION_PZONE,LOCATION_PZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,300) Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,300)
end end
......
...@@ -45,13 +45,13 @@ function c45627618.pcfilter(c) ...@@ -45,13 +45,13 @@ function c45627618.pcfilter(c)
end end
function c45627618.pctg(e,tp,eg,ep,ev,re,r,rp,chk) function c45627618.pctg(e,tp,eg,ep,ev,re,r,rp,chk)
local seq=e:GetHandler():GetSequence() local seq=e:GetHandler():GetSequence()
if chk==0 then return Duel.CheckLocation(tp,LOCATION_SZONE,13-seq) if chk==0 then return Duel.CheckLocation(tp,LOCATION_PZONE,({1,0,0,0,0,0,1,0})[seq+1])
and Duel.IsExistingMatchingCard(c45627618.pcfilter,tp,LOCATION_DECK,0,1,nil) end and Duel.IsExistingMatchingCard(c45627618.pcfilter,tp,LOCATION_DECK,0,1,nil) end
end end
function c45627618.pcop(e,tp,eg,ep,ev,re,r,rp) function c45627618.pcop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end if not e:GetHandler():IsRelateToEffect(e) then return end
local seq=e:GetHandler():GetSequence() local seq=e:GetHandler():GetSequence()
if not Duel.CheckLocation(tp,LOCATION_SZONE,13-seq) then return end if not Duel.CheckLocation(tp,LOCATION_PZONE,({1,0,0,0,0,0,1,0})[seq+1]) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD)
local g=Duel.SelectMatchingCard(tp,c45627618.pcfilter,tp,LOCATION_DECK,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,c45627618.pcfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then if g:GetCount()>0 then
...@@ -96,16 +96,12 @@ function c45627618.pencon(e,tp,eg,ep,ev,re,r,rp) ...@@ -96,16 +96,12 @@ function c45627618.pencon(e,tp,eg,ep,ev,re,r,rp)
return bit.band(r,REASON_EFFECT+REASON_BATTLE)~=0 and c:IsPreviousLocation(LOCATION_MZONE) and c:IsFaceup() return bit.band(r,REASON_EFFECT+REASON_BATTLE)~=0 and c:IsPreviousLocation(LOCATION_MZONE) and c:IsFaceup()
end end
function c45627618.pentg(e,tp,eg,ep,ev,re,r,rp,chk) function c45627618.pentg(e,tp,eg,ep,ev,re,r,rp,chk)
local lsc=Duel.GetFieldCard(tp,LOCATION_SZONE,6) if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_PZONE,0)>0 end
local rsc=Duel.GetFieldCard(tp,LOCATION_SZONE,7) local g=Duel.GetFieldGroup(tp,LOCATION_PZONE,0)
local g=Group.FromCards(lsc,rsc):Filter(aux.TRUE,nil)
if chk==0 then return g:GetCount()>0 end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0)
end end
function c45627618.penop(e,tp,eg,ep,ev,re,r,rp) function c45627618.penop(e,tp,eg,ep,ev,re,r,rp)
local lsc=Duel.GetFieldCard(tp,LOCATION_SZONE,6) local g=Duel.GetFieldGroup(tp,LOCATION_PZONE,0)
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 if Duel.Destroy(g,REASON_EFFECT)~=0 and e:GetHandler():IsRelateToEffect(e) then
Duel.MoveToField(e:GetHandler(),tp,tp,LOCATION_SZONE,POS_FACEUP,true) Duel.MoveToField(e:GetHandler(),tp,tp,LOCATION_SZONE,POS_FACEUP,true)
end end
......
...@@ -35,7 +35,7 @@ function c45974017.pctg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -35,7 +35,7 @@ function c45974017.pctg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local b1=Duel.IsExistingTarget(c45974017.pcfilter,tp,LOCATION_GRAVE,0,1,nil) local b1=Duel.IsExistingTarget(c45974017.pcfilter,tp,LOCATION_GRAVE,0,1,nil)
local b2=Duel.IsExistingMatchingCard(c45974017.pcfilter,tp,LOCATION_EXTRA,0,1,nil) local b2=Duel.IsExistingMatchingCard(c45974017.pcfilter,tp,LOCATION_EXTRA,0,1,nil)
if chk==0 then if chk==0 then
if not Duel.CheckLocation(tp,LOCATION_SZONE,6) and not Duel.CheckLocation(tp,LOCATION_SZONE,7) then return false end if not Duel.CheckLocation(tp,LOCATION_PZONE,0) and not Duel.CheckLocation(tp,LOCATION_PZONE,1) then return false end
return b1 or b2 return b1 or b2
end end
local op=0 local op=0
...@@ -54,7 +54,7 @@ function c45974017.pctg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -54,7 +54,7 @@ function c45974017.pctg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end end
function c45974017.pcop(e,tp,eg,ep,ev,re,r,rp) function c45974017.pcop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end if not e:GetHandler():IsRelateToEffect(e) then return end
if not Duel.CheckLocation(tp,LOCATION_SZONE,6) and not Duel.CheckLocation(tp,LOCATION_SZONE,7) then return false end if not Duel.CheckLocation(tp,LOCATION_PZONE,0) and not Duel.CheckLocation(tp,LOCATION_PZONE,1) then return false end
if e:GetLabel()==0 then if e:GetLabel()==0 then
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then if tc:IsRelateToEffect(e) then
......
...@@ -71,7 +71,7 @@ function c46035545.atkop(e,tp,eg,ep,ev,re,r,rp) ...@@ -71,7 +71,7 @@ function c46035545.atkop(e,tp,eg,ep,ev,re,r,rp)
end end
function c46035545.thcon(e,tp,eg,ep,ev,re,r,rp) function c46035545.thcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
return c:IsPreviousLocation(LOCATION_SZONE) and (c:GetPreviousSequence()==6 or c:GetPreviousSequence()==7) return c:IsPreviousLocation(LOCATION_PZONE)
end end
function c46035545.thfilter(c) function c46035545.thfilter(c)
return c:IsFaceup() and c:IsSetCard(0x10af) and c:IsAbleToHand() return c:IsFaceup() and c:IsSetCard(0x10af) and c:IsAbleToHand()
...@@ -82,7 +82,7 @@ end ...@@ -82,7 +82,7 @@ end
function c46035545.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c46035545.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c46035545.thfilter(chkc) end if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c46035545.thfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c46035545.thfilter,tp,LOCATION_MZONE,0,1,nil) if chk==0 then return Duel.IsExistingTarget(c46035545.thfilter,tp,LOCATION_MZONE,0,1,nil)
and (Duel.CheckLocation(tp,LOCATION_SZONE,6) or Duel.CheckLocation(tp,LOCATION_SZONE,7)) and (Duel.CheckLocation(tp,LOCATION_PZONE,0) or Duel.CheckLocation(tp,LOCATION_PZONE,1))
and Duel.IsExistingMatchingCard(c46035545.pfilter,tp,LOCATION_EXTRA,0,1,nil) end and Duel.IsExistingMatchingCard(c46035545.pfilter,tp,LOCATION_EXTRA,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectTarget(tp,c46035545.thfilter,tp,LOCATION_MZONE,0,1,1,nil) local g=Duel.SelectTarget(tp,c46035545.thfilter,tp,LOCATION_MZONE,0,1,1,nil)
...@@ -93,8 +93,8 @@ function c46035545.thop(e,tp,eg,ep,ev,re,r,rp) ...@@ -93,8 +93,8 @@ function c46035545.thop(e,tp,eg,ep,ev,re,r,rp)
if tc:IsRelateToEffect(e) and Duel.SendtoHand(tc,nil,REASON_EFFECT)~=0 if tc:IsRelateToEffect(e) and Duel.SendtoHand(tc,nil,REASON_EFFECT)~=0
and tc:IsLocation(LOCATION_HAND) then and tc:IsLocation(LOCATION_HAND) then
local ct=0 local ct=0
if Duel.CheckLocation(tp,LOCATION_SZONE,6) then ct=ct+1 end if Duel.CheckLocation(tp,LOCATION_PZONE,0) then ct=ct+1 end
if Duel.CheckLocation(tp,LOCATION_SZONE,7) then ct=ct+1 end if Duel.CheckLocation(tp,LOCATION_PZONE,1) then ct=ct+1 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD)
local g=Duel.SelectMatchingCard(tp,c46035545.pfilter,tp,LOCATION_EXTRA,0,1,ct,nil) local g=Duel.SelectMatchingCard(tp,c46035545.pfilter,tp,LOCATION_EXTRA,0,1,ct,nil)
local pc=g:GetFirst() local pc=g:GetFirst()
......
...@@ -30,8 +30,8 @@ function c46500985.initial_effect(c) ...@@ -30,8 +30,8 @@ function c46500985.initial_effect(c)
end end
function c46500985.immcon(e) function c46500985.immcon(e)
local tp=e:GetHandlerPlayer() local tp=e:GetHandlerPlayer()
local c1=Duel.GetFieldCard(tp,LOCATION_SZONE,6) local c1=Duel.GetFieldCard(tp,LOCATION_PZONE,0)
local c2=Duel.GetFieldCard(tp,LOCATION_SZONE,7) local c2=Duel.GetFieldCard(tp,LOCATION_PZONE,1)
return (c1 and c1:IsSetCard(0xe1)) or (c2 and c2:IsSetCard(0xe1)) return (c1 and c1:IsSetCard(0xe1)) or (c2 and c2:IsSetCard(0xe1))
end end
function c46500985.etarget(e,c) function c46500985.etarget(e,c)
......
...@@ -59,7 +59,7 @@ end ...@@ -59,7 +59,7 @@ end
function c47349116.repfilter(c,tp) function c47349116.repfilter(c,tp)
local seq=c:GetSequence() local seq=c:GetSequence()
return c:IsFaceup() and c:IsControler(tp) return c:IsFaceup() and c:IsControler(tp)
and (c:IsLocation(LOCATION_MZONE) or (c:IsLocation(LOCATION_SZONE) and (seq==6 or seq==7))) and c:IsLocation(LOCATION_MZONE+LOCATION_PZONE)
and c:IsType(TYPE_PENDULUM) and c:IsReason(REASON_BATTLE+REASON_EFFECT) and c:IsType(TYPE_PENDULUM) and c:IsReason(REASON_BATTLE+REASON_EFFECT)
end end
function c47349116.tgfilter(c) function c47349116.tgfilter(c)
......
...@@ -49,7 +49,7 @@ function c47598941.condition(e,tp,eg,ep,ev,re,r,rp) ...@@ -49,7 +49,7 @@ function c47598941.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated()
end end
function c47598941.cfilter(c,tp) function c47598941.cfilter(c,tp)
return c:IsPreviousLocation(LOCATION_SZONE) and (c:GetPreviousSequence()==6 or c:GetPreviousSequence()==7) and c:GetPreviousControler()==tp return c:IsPreviousLocation(LOCATION_PZONE) and c:GetPreviousControler()==tp
end end
function c47598941.setcon(e,tp,eg,ep,ev,re,r,rp) function c47598941.setcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c47598941.cfilter,1,nil,tp) return eg:IsExists(c47598941.cfilter,1,nil,tp)
...@@ -58,19 +58,19 @@ function c47598941.filter(c) ...@@ -58,19 +58,19 @@ function c47598941.filter(c)
return c:IsSetCard(0xe0) and c:IsType(TYPE_PENDULUM) and not c:IsForbidden() return c:IsSetCard(0xe0) and c:IsType(TYPE_PENDULUM) and not c:IsForbidden()
end end
function c47598941.settg1(e,tp,eg,ep,ev,re,r,rp,chk) function c47598941.settg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return (Duel.CheckLocation(tp,LOCATION_SZONE,6) or Duel.CheckLocation(tp,LOCATION_SZONE,7)) if chk==0 then return (Duel.CheckLocation(tp,LOCATION_PZONE,0) or Duel.CheckLocation(tp,LOCATION_PZONE,1))
and Duel.IsExistingMatchingCard(c47598941.filter,tp,LOCATION_DECK,0,1,nil) end and Duel.IsExistingMatchingCard(c47598941.filter,tp,LOCATION_DECK,0,1,nil) end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription()) Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
end end
function c47598941.settg2(e,tp,eg,ep,ev,re,r,rp,chk) function c47598941.settg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsRelateToEffect(e) if chk==0 then return e:GetHandler():IsRelateToEffect(e)
and (Duel.CheckLocation(tp,LOCATION_SZONE,6) or Duel.CheckLocation(tp,LOCATION_SZONE,7)) and (Duel.CheckLocation(tp,LOCATION_PZONE,0) or Duel.CheckLocation(tp,LOCATION_PZONE,1))
and Duel.IsExistingMatchingCard(c47598941.filter,tp,LOCATION_DECK,0,1,nil) end and Duel.IsExistingMatchingCard(c47598941.filter,tp,LOCATION_DECK,0,1,nil) end
end end
function c47598941.setop(e,tp,eg,ep,ev,re,r,rp) function c47598941.setop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end if not c:IsRelateToEffect(e) then return end
if not (Duel.CheckLocation(tp,LOCATION_SZONE,6) or Duel.CheckLocation(tp,LOCATION_SZONE,7)) then return end if not (Duel.CheckLocation(tp,LOCATION_PZONE,0) or Duel.CheckLocation(tp,LOCATION_PZONE,1)) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD)
local g=Duel.SelectMatchingCard(tp,c47598941.filter,tp,LOCATION_DECK,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,c47598941.filter,tp,LOCATION_DECK,0,1,1,nil)
local tc=g:GetFirst() local tc=g:GetFirst()
......
...@@ -14,7 +14,7 @@ function c50407691.initial_effect(c) ...@@ -14,7 +14,7 @@ function c50407691.initial_effect(c)
end end
function c50407691.thcon(e,tp,eg,ep,ev,re,r,rp) function c50407691.thcon(e,tp,eg,ep,ev,re,r,rp)
local seq=e:GetHandler():GetSequence() local seq=e:GetHandler():GetSequence()
local pc=Duel.GetFieldCard(tp,LOCATION_SZONE,13-seq) local pc=Duel.GetFieldCard(tp,LOCATION_PZONE,({1,0,0,0,0,0,1,0})[seq+1])
return pc and pc:IsSetCard(0xc8) return pc and pc:IsSetCard(0xc8)
end end
function c50407691.filter(c) function c50407691.filter(c)
...@@ -22,7 +22,7 @@ function c50407691.filter(c) ...@@ -22,7 +22,7 @@ function c50407691.filter(c)
end end
function c50407691.thtg(e,tp,eg,ep,ev,re,r,rp,chk) function c50407691.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
local pc=Duel.GetFieldCard(tp,LOCATION_SZONE,13-c:GetSequence()) local pc=Duel.GetFieldCard(tp,LOCATION_PZONE,({1,0,0,0,0,0,1,0})[c:GetSequence()+1])
if chk==0 then return Duel.IsExistingMatchingCard(c50407691.filter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(c50407691.filter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end
local g=Group.FromCards(c,pc) local g=Group.FromCards(c,pc)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,2,0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,2,0,0)
...@@ -31,7 +31,7 @@ end ...@@ -31,7 +31,7 @@ end
function c50407691.thop(e,tp,eg,ep,ev,re,r,rp) function c50407691.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end if not c:IsRelateToEffect(e) then return end
local pc=Duel.GetFieldCard(tp,LOCATION_SZONE,13-c:GetSequence()) local pc=Duel.GetFieldCard(tp,LOCATION_PZONE,({1,0,0,0,0,0,1,0})[c:GetSequence()+1])
if not pc then return end if not pc then return end
local dg=Group.FromCards(c,pc) local dg=Group.FromCards(c,pc)
if Duel.Destroy(dg,REASON_EFFECT)~=2 then return end if Duel.Destroy(dg,REASON_EFFECT)~=2 then return end
......
...@@ -81,7 +81,7 @@ function c51028231.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -81,7 +81,7 @@ function c51028231.spop(e,tp,eg,ep,ev,re,r,rp)
end end
function c51028231.descon(e,tp,eg,ep,ev,re,r,rp) function c51028231.descon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
return c:IsReason(REASON_EFFECT) and c:IsPreviousLocation(LOCATION_SZONE) and (c:GetPreviousSequence()==6 or c:GetPreviousSequence()==7) return c:IsReason(REASON_EFFECT) and c:IsPreviousLocation(LOCATION_PZONE)
end end
function c51028231.desfilter(c) function c51028231.desfilter(c)
return c:IsFaceup() and c:IsLevelBelow(4) return c:IsFaceup() and c:IsLevelBelow(4)
......
...@@ -36,7 +36,7 @@ end ...@@ -36,7 +36,7 @@ end
function c51391183.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c51391183.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return false end if chkc then return false end
local seq=e:GetHandler():GetSequence() local seq=e:GetHandler():GetSequence()
local tc=Duel.GetFieldCard(tp,LOCATION_SZONE,13-seq) local tc=Duel.GetFieldCard(tp,LOCATION_PZONE,({1,0,0,0,0,0,1,0})[seq+1])
if chk==0 then return tc and tc:IsSetCard(0x10ec) and tc:IsCanBeEffectTarget(e) end if chk==0 then return tc and tc:IsSetCard(0x10ec) and tc:IsCanBeEffectTarget(e) end
Duel.SetTargetCard(tc) Duel.SetTargetCard(tc)
end end
......
...@@ -18,7 +18,7 @@ function c51531505.initial_effect(c) ...@@ -18,7 +18,7 @@ function c51531505.initial_effect(c)
end end
function c51531505.condition(e,tp,eg,ep,ev,re,r,rp) function c51531505.condition(e,tp,eg,ep,ev,re,r,rp)
local seq=e:GetHandler():GetSequence() local seq=e:GetHandler():GetSequence()
local tc=Duel.GetFieldCard(tp,LOCATION_SZONE,13-seq) local tc=Duel.GetFieldCard(tp,LOCATION_PZONE,({1,0,0,0,0,0,1,0})[seq+1])
return tc and tc:IsSetCard(0x98) return tc and tc:IsSetCard(0x98)
end end
function c51531505.cfilter(c) function c51531505.cfilter(c)
......
...@@ -11,14 +11,14 @@ function c5153769.initial_effect(c) ...@@ -11,14 +11,14 @@ function c5153769.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c5153769.filter(c,e,tp) function c5153769.filter(c,e,tp)
return (c:GetSequence()==6 or c:GetSequence()==7) and c:IsSetCard(0xd0) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsSetCard(0xd0) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function c5153769.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c5153769.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_SZONE) and chkc:IsControler(tp) and c5153769.filter(chkc,e,tp) end if chkc then return chkc:IsLocation(LOCATION_PZONE) and chkc:IsControler(tp) and c5153769.filter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c5153769.filter,tp,LOCATION_SZONE,0,1,nil,e,tp) end and Duel.IsExistingTarget(c5153769.filter,tp,LOCATION_PZONE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c5153769.filter,tp,LOCATION_SZONE,0,1,1,nil,e,tp) local g=Duel.SelectTarget(tp,c5153769.filter,tp,LOCATION_PZONE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end end
function c5153769.activate(e,tp,eg,ep,ev,re,r,rp) function c5153769.activate(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -36,8 +36,8 @@ function c5255013.initial_effect(c) ...@@ -36,8 +36,8 @@ function c5255013.initial_effect(c)
c:RegisterEffect(e4) c:RegisterEffect(e4)
end end
function c5255013.condition(e,tp,eg,ep,ev,re,r,rp) function c5255013.condition(e,tp,eg,ep,ev,re,r,rp)
local tc1=Duel.GetFieldCard(tp,LOCATION_SZONE,6) local tc1=Duel.GetFieldCard(tp,LOCATION_PZONE,0)
local tc2=Duel.GetFieldCard(tp,LOCATION_SZONE,7) local tc2=Duel.GetFieldCard(tp,LOCATION_PZONE,1)
if not tc1 or not tc2 or not tc1:IsSetCard(0xc4) or not tc2:IsSetCard(0xc4) then return false end 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 scl1=tc1:GetLeftScale()
local scl2=tc2:GetRightScale() local scl2=tc2:GetRightScale()
...@@ -59,10 +59,10 @@ function c5255013.splimit(e,c,sump,sumtype,sumpos,targetp) ...@@ -59,10 +59,10 @@ function c5255013.splimit(e,c,sump,sumtype,sumpos,targetp)
end end
function c5255013.tgcon(e) function c5255013.tgcon(e)
local tp=e:GetHandlerPlayer() local tp=e:GetHandlerPlayer()
return Duel.GetFieldCard(tp,LOCATION_SZONE,6) or Duel.GetFieldCard(tp,LOCATION_SZONE,7) return Duel.GetFieldCard(tp,LOCATION_PZONE,0) or Duel.GetFieldCard(tp,LOCATION_PZONE,1)
end end
function c5255013.desfilter(c,tp) function c5255013.desfilter(c,tp)
return c:IsControler(tp) and c:IsLocation(LOCATION_SZONE) and (c:GetSequence()==6 or c:GetSequence()==7) return c:IsControler(tp) and c:IsLocation(LOCATION_PZONE)
end end
function c5255013.descon(e,tp,eg,ep,ev,re,r,rp) function c5255013.descon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c5255013.desfilter,1,nil,tp) return eg:IsExists(c5255013.desfilter,1,nil,tp)
......
...@@ -52,13 +52,10 @@ function c53208660.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -52,13 +52,10 @@ function c53208660.activate(e,tp,eg,ep,ev,re,r,rp)
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_INDESTRUCTABLE_EFFECT) e1:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e1:SetTargetRange(LOCATION_SZONE,0) e1:SetTargetRange(LOCATION_PZONE,0)
e1:SetTarget(c53208660.indtg) e1:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x98))
e1:SetValue(1) e1:SetValue(1)
e1:SetReset(RESET_PHASE+PHASE_END+RESET_OPPO_TURN) e1:SetReset(RESET_PHASE+PHASE_END+RESET_OPPO_TURN)
Duel.RegisterEffect(e1,tp) Duel.RegisterEffect(e1,tp)
end end
end end
function c53208660.indtg(e,c)
return (c:GetSequence()==6 or c:GetSequence()==7) and c:IsSetCard(0x98)
end
...@@ -35,14 +35,11 @@ function c53724621.drop(e,tp,eg,ep,ev,re,r,rp) ...@@ -35,14 +35,11 @@ function c53724621.drop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end if not e:GetHandler():IsRelateToEffect(e) then return end
Duel.Draw(tp,1,REASON_EFFECT) Duel.Draw(tp,1,REASON_EFFECT)
end end
function c53724621.filter(c)
return c:GetSequence()==6 or c:GetSequence()==7
end
function c53724621.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c53724621.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_SZONE) and chkc:IsControler(tp) and c53724621.filter(chkc) end if chkc then return chkc:IsLocation(LOCATION_PZONE) and chkc:IsControler(tp) and c53724621.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c53724621.filter,tp,LOCATION_SZONE,0,1,nil) end if chk==0 then return Duel.IsExistingTarget(nil,tp,LOCATION_PZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
Duel.SelectTarget(tp,c53724621.filter,tp,LOCATION_SZONE,0,1,1,nil) Duel.SelectTarget(tp,c53724621.filter,tp,LOCATION_PZONE,0,1,1,nil)
end end
function c53724621.operation(e,tp,eg,ep,ev,re,r,rp) function c53724621.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
......
...@@ -68,7 +68,7 @@ function c5399521.thop(e,tp,eg,ep,ev,re,r,rp) ...@@ -68,7 +68,7 @@ function c5399521.thop(e,tp,eg,ep,ev,re,r,rp)
end end
function c5399521.slcon(e) function c5399521.slcon(e)
local seq=e:GetHandler():GetSequence() local seq=e:GetHandler():GetSequence()
local tc=Duel.GetFieldCard(e:GetHandlerPlayer(),LOCATION_SZONE,13-seq) local tc=Duel.GetFieldCard(e:GetHandlerPlayer(),LOCATION_PZONE,({1,0,0,0,0,0,1,0})[seq+1])
return not tc or not tc:IsSetCard(0x1066) return not tc or not tc:IsSetCard(0x1066)
end end
function c5399521.spcon(e,c) function c5399521.spcon(e,c)
......
...@@ -25,8 +25,8 @@ function c54941203.initial_effect(c) ...@@ -25,8 +25,8 @@ function c54941203.initial_effect(c)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
function c54941203.spcon(e,tp,eg,ep,ev,re,r,rp) function c54941203.spcon(e,tp,eg,ep,ev,re,r,rp)
local tc1=Duel.GetFieldCard(tp,LOCATION_SZONE,6) local tc1=Duel.GetFieldCard(tp,LOCATION_PZONE,0)
local tc2=Duel.GetFieldCard(tp,LOCATION_SZONE,7) local tc2=Duel.GetFieldCard(tp,LOCATION_PZONE,1)
return tc1 and tc1:IsSetCard(0x98) and tc2 and tc2:IsSetCard(0x98) return tc1 and tc1:IsSetCard(0x98) and tc2 and tc2:IsSetCard(0x98)
end end
function c54941203.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c54941203.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
......
...@@ -67,7 +67,7 @@ function c55106249.atkval(e,c) ...@@ -67,7 +67,7 @@ function c55106249.atkval(e,c)
end end
function c55106249.thcon(e,tp,eg,ep,ev,re,r,rp) function c55106249.thcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
return c:IsPreviousLocation(LOCATION_SZONE) and (c:GetPreviousSequence()==6 or c:GetPreviousSequence()==7) return c:IsPreviousLocation(LOCATION_PZONE)
end end
function c55106249.thfilter(c) function c55106249.thfilter(c)
return c:IsSetCard(0xab) and c:IsAbleToHand() return c:IsSetCard(0xab) and c:IsAbleToHand()
......
...@@ -23,7 +23,7 @@ function c56675280.initial_effect(c) ...@@ -23,7 +23,7 @@ function c56675280.initial_effect(c)
end end
function c56675280.sccon(e,tp,eg,ep,ev,re,r,rp) function c56675280.sccon(e,tp,eg,ep,ev,re,r,rp)
local seq=e:GetHandler():GetSequence() local seq=e:GetHandler():GetSequence()
local tc=Duel.GetFieldCard(tp,LOCATION_SZONE,13-seq) local tc=Duel.GetFieldCard(tp,LOCATION_PZONE,({1,0,0,0,0,0,1,0})[seq+1])
return tc and (tc:IsSetCard(0x98) or tc:IsSetCard(0x99) or tc:IsSetCard(0x9f)) and not tc:IsCode(56675280) return tc and (tc:IsSetCard(0x98) or tc:IsSetCard(0x99) or tc:IsSetCard(0x9f)) and not tc:IsCode(56675280)
end end
function c56675280.sctg(e,tp,eg,ep,ev,re,r,rp,chk) function c56675280.sctg(e,tp,eg,ep,ev,re,r,rp,chk)
......
...@@ -35,21 +35,21 @@ function c58016954.condition1(e,tp,eg,ep,ev,re,r,rp) ...@@ -35,21 +35,21 @@ function c58016954.condition1(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetSummonType()==SUMMON_TYPE_PENDULUM return e:GetHandler():GetSummonType()==SUMMON_TYPE_PENDULUM
end end
function c58016954.cfilter(c) function c58016954.cfilter(c)
return (c:GetSequence()==6 or c:GetSequence()==7) and c:IsSetCard(0xc4) return c:IsSetCard(0xc4)
end end
function c58016954.filter(c) function c58016954.filter(c)
return (c:GetSequence()==6 or c:GetSequence()==7) and c:IsAbleToHand() return c:IsAbleToHand()
end end
function c58016954.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) 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 chkc then return chkc:IsLocation(LOCATION_PZONE) and c58016954.filter(chkc) end
if chk==0 then return Duel.IsExistingMatchingCard(c58016954.cfilter,tp,LOCATION_SZONE,0,1,nil) if chk==0 then return Duel.IsExistingMatchingCard(c58016954.cfilter,tp,LOCATION_PZONE,0,1,nil)
and Duel.IsExistingTarget(c58016954.filter,tp,LOCATION_SZONE,LOCATION_SZONE,1,nil) end and Duel.IsExistingTarget(c58016954.filter,tp,LOCATION_PZONE,LOCATION_PZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g=Duel.SelectTarget(tp,c58016954.filter,tp,LOCATION_SZONE,LOCATION_SZONE,1,1,nil) local g=Duel.SelectTarget(tp,c58016954.filter,tp,LOCATION_PZONE,LOCATION_PZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
end end
function c58016954.operation(e,tp,eg,ep,ev,re,r,rp) 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 if not Duel.IsExistingMatchingCard(c58016954.cfilter,tp,LOCATION_PZONE,0,1,nil) then return end
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then if tc:IsRelateToEffect(e) then
Duel.SendtoHand(tc,nil,REASON_EFFECT) Duel.SendtoHand(tc,nil,REASON_EFFECT)
......
...@@ -17,15 +17,12 @@ function c58369990.cost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -17,15 +17,12 @@ 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 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) Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD)
end end
function c58369990.filter(c)
return (c:GetSequence()==6 or c:GetSequence()==7)
end
function c58369990.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) 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 chkc then return chkc:IsLocation(LOCATION_PZONE) end
if chk==0 then return Duel.IsPlayerCanDraw(tp,1) if chk==0 then return Duel.IsPlayerCanDraw(tp,1)
and Duel.IsExistingTarget(c58369990.filter,tp,LOCATION_SZONE,LOCATION_SZONE,1,nil) end and Duel.IsExistingTarget(nil,tp,LOCATION_PZONE,LOCATION_PZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,c58369990.filter,tp,LOCATION_SZONE,LOCATION_SZONE,1,1,nil) local g=Duel.SelectTarget(tp,nil,tp,LOCATION_PZONE,LOCATION_PZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end end
......
...@@ -11,8 +11,8 @@ function c59057953.initial_effect(c) ...@@ -11,8 +11,8 @@ function c59057953.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c59057953.condition(e,tp,eg,ep,ev,re,r,rp) function c59057953.condition(e,tp,eg,ep,ev,re,r,rp)
local tc1=Duel.GetFieldCard(tp,LOCATION_SZONE,6) local tc1=Duel.GetFieldCard(tp,LOCATION_PZONE,0)
local tc2=Duel.GetFieldCard(tp,LOCATION_SZONE,7) local tc2=Duel.GetFieldCard(tp,LOCATION_PZONE,1)
return tc1 and tc1:IsSetCard(0x10ec) and tc2 and tc2:IsSetCard(0x10ec) return tc1 and tc1:IsSetCard(0x10ec) and tc2 and tc2:IsSetCard(0x10ec)
end end
function c59057953.filter(c) function c59057953.filter(c)
......
...@@ -31,12 +31,12 @@ end ...@@ -31,12 +31,12 @@ end
function c59762399.spcon(e,tp,eg,ep,ev,re,r,rp) function c59762399.spcon(e,tp,eg,ep,ev,re,r,rp)
local at=Duel.GetAttacker() local at=Duel.GetAttacker()
local seq=e:GetHandler():GetSequence() local seq=e:GetHandler():GetSequence()
return at:GetControler()~=tp and Duel.GetAttackTarget()==nil and Duel.GetFieldCard(tp,LOCATION_SZONE,13-seq) return at:GetControler()~=tp and Duel.GetAttackTarget()==nil and Duel.GetFieldCard(tp,LOCATION_PZONE,({1,0,0,0,0,0,1,0})[seq+1])
end end
function c59762399.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c59762399.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
local seq=c:GetSequence() local seq=c:GetSequence()
local tc=Duel.GetFieldCard(tp,LOCATION_SZONE,13-seq) local tc=Duel.GetFieldCard(tp,LOCATION_PZONE,({1,0,0,0,0,0,1,0})[seq+1])
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,tc,1,0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,tc,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
...@@ -45,7 +45,7 @@ function c59762399.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -45,7 +45,7 @@ function c59762399.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end if not c:IsRelateToEffect(e) then return end
local seq=c:GetSequence() local seq=c:GetSequence()
local tc=Duel.GetFieldCard(tp,LOCATION_SZONE,13-seq) local tc=Duel.GetFieldCard(tp,LOCATION_PZONE,({1,0,0,0,0,0,1,0})[seq+1])
if tc and Duel.Destroy(tc,REASON_EFFECT)~=0 then if tc and Duel.Destroy(tc,REASON_EFFECT)~=0 then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end end
......
...@@ -30,8 +30,8 @@ function c60675348.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -30,8 +30,8 @@ function c60675348.activate(e,tp,eg,ep,ev,re,r,rp)
if not c:IsRelateToEffect(e) then return end if not c:IsRelateToEffect(e) then return end
local g=Duel.GetMatchingGroup(c60675348.filter,tp,LOCATION_DECK,0,nil) local g=Duel.GetMatchingGroup(c60675348.filter,tp,LOCATION_DECK,0,nil)
local ct=0 local ct=0
if Duel.CheckLocation(tp,LOCATION_SZONE,6) then ct=ct+1 end if Duel.CheckLocation(tp,LOCATION_PZONE,0) then ct=ct+1 end
if Duel.CheckLocation(tp,LOCATION_SZONE,7) then ct=ct+1 end if Duel.CheckLocation(tp,LOCATION_PZONE,1) then ct=ct+1 end
if ct>0 and g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(60675348,0)) then if ct>0 and g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(60675348,0)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD)
local sg=g:Select(tp,1,ct,nil) local sg=g:Select(tp,1,ct,nil)
......
...@@ -14,7 +14,7 @@ function c61639289.initial_effect(c) ...@@ -14,7 +14,7 @@ function c61639289.initial_effect(c)
end end
function c61639289.thcon(e,tp,eg,ep,ev,re,r,rp) function c61639289.thcon(e,tp,eg,ep,ev,re,r,rp)
local seq=e:GetHandler():GetSequence() local seq=e:GetHandler():GetSequence()
local pc=Duel.GetFieldCard(tp,LOCATION_SZONE,13-seq) local pc=Duel.GetFieldCard(tp,LOCATION_PZONE,({1,0,0,0,0,0,1,0})[seq+1])
return pc and pc:IsSetCard(0xc8) return pc and pc:IsSetCard(0xc8)
end end
function c61639289.filter(c) function c61639289.filter(c)
...@@ -22,7 +22,7 @@ function c61639289.filter(c) ...@@ -22,7 +22,7 @@ function c61639289.filter(c)
end end
function c61639289.thtg(e,tp,eg,ep,ev,re,r,rp,chk) function c61639289.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
local pc=Duel.GetFieldCard(tp,LOCATION_SZONE,13-c:GetSequence()) local pc=Duel.GetFieldCard(tp,LOCATION_PZONE,({1,0,0,0,0,0,1,0})[c:GetSequence()+1])
if chk==0 then return Duel.IsExistingMatchingCard(c61639289.filter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(c61639289.filter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end
local g=Group.FromCards(c,pc) local g=Group.FromCards(c,pc)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,2,0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,2,0,0)
...@@ -31,7 +31,7 @@ end ...@@ -31,7 +31,7 @@ end
function c61639289.thop(e,tp,eg,ep,ev,re,r,rp) function c61639289.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end if not c:IsRelateToEffect(e) then return end
local pc=Duel.GetFieldCard(tp,LOCATION_SZONE,13-c:GetSequence()) local pc=Duel.GetFieldCard(tp,LOCATION_PZONE,({1,0,0,0,0,0,1,0})[c:GetSequence()+1])
if not pc then return end if not pc then return end
local dg=Group.FromCards(c,pc) local dg=Group.FromCards(c,pc)
if Duel.Destroy(dg,REASON_EFFECT)~=2 then return end if Duel.Destroy(dg,REASON_EFFECT)~=2 then return end
......
...@@ -22,7 +22,7 @@ function c61884774.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -22,7 +22,7 @@ function c61884774.target(e,tp,eg,ep,ev,re,r,rp,chk)
local b1=Duel.IsExistingMatchingCard(c61884774.thfilter,tp,LOCATION_DECK,0,1,nil) local b1=Duel.IsExistingMatchingCard(c61884774.thfilter,tp,LOCATION_DECK,0,1,nil)
local b2=(Duel.IsExistingMatchingCard(c61884774.pzfilter,tp,LOCATION_DECK,0,1,nil,65025250) local b2=(Duel.IsExistingMatchingCard(c61884774.pzfilter,tp,LOCATION_DECK,0,1,nil,65025250)
and Duel.IsExistingMatchingCard(c61884774.pzfilter,tp,LOCATION_DECK,0,1,nil,91420254) and Duel.IsExistingMatchingCard(c61884774.pzfilter,tp,LOCATION_DECK,0,1,nil,91420254)
and Duel.CheckLocation(tp,LOCATION_SZONE,6) and Duel.CheckLocation(tp,LOCATION_SZONE,7)) and Duel.CheckLocation(tp,LOCATION_PZONE,0) and Duel.CheckLocation(tp,LOCATION_PZONE,1))
if chk==0 then return b1 or b2 end if chk==0 then return b1 or b2 end
local op=0 local op=0
if b1 and b2 then if b1 and b2 then
...@@ -61,7 +61,7 @@ function c61884774.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -61,7 +61,7 @@ function c61884774.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.ConfirmCards(1-tp,g) Duel.ConfirmCards(1-tp,g)
end end
else else
if not Duel.CheckLocation(tp,LOCATION_SZONE,6) or not Duel.CheckLocation(tp,LOCATION_SZONE,7) then return end if not Duel.CheckLocation(tp,LOCATION_PZONE,0) or not Duel.CheckLocation(tp,LOCATION_PZONE,1) then return end
local tc1=Duel.GetFirstMatchingCard(c61884774.pzfilter,tp,LOCATION_DECK,0,nil,65025250) local tc1=Duel.GetFirstMatchingCard(c61884774.pzfilter,tp,LOCATION_DECK,0,nil,65025250)
local tc2=Duel.GetFirstMatchingCard(c61884774.pzfilter,tp,LOCATION_DECK,0,nil,91420254) local tc2=Duel.GetFirstMatchingCard(c61884774.pzfilter,tp,LOCATION_DECK,0,nil,91420254)
if not (tc1 and tc2) then return end if not (tc1 and tc2) then return end
......
...@@ -29,7 +29,7 @@ function c62681049.tdtg(e,c) ...@@ -29,7 +29,7 @@ function c62681049.tdtg(e,c)
end end
function c62681049.tdcon(e) function c62681049.tdcon(e)
local tp=e:GetHandlerPlayer() local tp=e:GetHandlerPlayer()
local tc1=Duel.GetFieldCard(tp,LOCATION_SZONE,6) local tc1=Duel.GetFieldCard(tp,LOCATION_PZONE,0)
local tc2=Duel.GetFieldCard(tp,LOCATION_SZONE,7) local tc2=Duel.GetFieldCard(tp,LOCATION_PZONE,1)
return (tc1 and tc1:IsSetCard(0xb3)) or (tc2 and tc2:IsSetCard(0xb3)) return (tc1 and tc1:IsSetCard(0xb3)) or (tc2 and tc2:IsSetCard(0xb3))
end end
...@@ -11,8 +11,7 @@ function c65646587.initial_effect(c) ...@@ -11,8 +11,7 @@ function c65646587.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c65646587.filter0(c,e) function c65646587.filter0(c,e)
local seq=c:GetSequence() return c:IsCanBeFusionMaterial() and not c:IsImmuneToEffect(e)
return (seq==6 or seq==7) and c:IsCanBeFusionMaterial() and not c:IsImmuneToEffect(e)
end end
function c65646587.filter1(c,e) function c65646587.filter1(c,e)
return c:IsOnField() and not c:IsImmuneToEffect(e) return c:IsOnField() and not c:IsImmuneToEffect(e)
...@@ -25,8 +24,8 @@ function c65646587.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -25,8 +24,8 @@ function c65646587.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then if chk==0 then
local chkf=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and PLAYER_NONE or tp local chkf=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and PLAYER_NONE or tp
local mg1=Duel.GetFusionMaterial(tp):Filter(Card.IsOnField,nil) local mg1=Duel.GetFusionMaterial(tp):Filter(Card.IsOnField,nil)
if Duel.GetFieldCard(tp,LOCATION_SZONE,6) and Duel.GetFieldCard(tp,LOCATION_SZONE,7) then if Duel.GetFieldCard(tp,LOCATION_PZONE,0) and Duel.GetFieldCard(tp,LOCATION_PZONE,1) then
mg1:Merge(Duel.GetMatchingGroup(c65646587.filter0,tp,LOCATION_SZONE,0,nil,e)) mg1:Merge(Duel.GetMatchingGroup(c65646587.filter0,tp,LOCATION_PZONE,0,nil,e))
end end
local res=Duel.IsExistingMatchingCard(c65646587.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,nil,chkf) local res=Duel.IsExistingMatchingCard(c65646587.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,nil,chkf)
if not res then if not res then
...@@ -45,8 +44,8 @@ end ...@@ -45,8 +44,8 @@ end
function c65646587.activate(e,tp,eg,ep,ev,re,r,rp) function c65646587.activate(e,tp,eg,ep,ev,re,r,rp)
local chkf=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and PLAYER_NONE or tp local chkf=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and PLAYER_NONE or tp
local mg1=Duel.GetFusionMaterial(tp):Filter(c65646587.filter1,nil,e) local mg1=Duel.GetFusionMaterial(tp):Filter(c65646587.filter1,nil,e)
if Duel.GetFieldCard(tp,LOCATION_SZONE,6) and Duel.GetFieldCard(tp,LOCATION_SZONE,7) then if Duel.GetFieldCard(tp,LOCATION_PZONE,0) and Duel.GetFieldCard(tp,LOCATION_PZONE,1) then
mg1:Merge(Duel.GetMatchingGroup(c65646587.filter0,tp,LOCATION_SZONE,0,nil,e)) mg1:Merge(Duel.GetMatchingGroup(c65646587.filter0,tp,LOCATION_PZONE,0,nil,e))
end end
local sg1=Duel.GetMatchingGroup(c65646587.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg1,nil,chkf) local sg1=Duel.GetMatchingGroup(c65646587.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg1,nil,chkf)
local mg2=nil local mg2=nil
......
...@@ -14,7 +14,7 @@ function c67273917.initial_effect(c) ...@@ -14,7 +14,7 @@ function c67273917.initial_effect(c)
end end
function c67273917.thcon(e,tp,eg,ep,ev,re,r,rp) function c67273917.thcon(e,tp,eg,ep,ev,re,r,rp)
local seq=e:GetHandler():GetSequence() local seq=e:GetHandler():GetSequence()
local pc=Duel.GetFieldCard(tp,LOCATION_SZONE,13-seq) local pc=Duel.GetFieldCard(tp,LOCATION_PZONE,({1,0,0,0,0,0,1,0})[seq+1])
return pc and pc:IsSetCard(0xc8) return pc and pc:IsSetCard(0xc8)
end end
function c67273917.filter(c) function c67273917.filter(c)
...@@ -22,7 +22,7 @@ function c67273917.filter(c) ...@@ -22,7 +22,7 @@ function c67273917.filter(c)
end end
function c67273917.thtg(e,tp,eg,ep,ev,re,r,rp,chk) function c67273917.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
local pc=Duel.GetFieldCard(tp,LOCATION_SZONE,13-c:GetSequence()) local pc=Duel.GetFieldCard(tp,LOCATION_PZONE,({1,0,0,0,0,0,1,0})[c:GetSequence()+1])
if chk==0 then return Duel.IsExistingMatchingCard(c67273917.filter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(c67273917.filter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end
local g=Group.FromCards(c,pc) local g=Group.FromCards(c,pc)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,2,0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,2,0,0)
...@@ -31,7 +31,7 @@ end ...@@ -31,7 +31,7 @@ end
function c67273917.thop(e,tp,eg,ep,ev,re,r,rp) function c67273917.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end if not c:IsRelateToEffect(e) then return end
local pc=Duel.GetFieldCard(tp,LOCATION_SZONE,13-c:GetSequence()) local pc=Duel.GetFieldCard(tp,LOCATION_PZONE,({1,0,0,0,0,0,1,0})[c:GetSequence()+1])
if not pc then return end if not pc then return end
local dg=Group.FromCards(c,pc) local dg=Group.FromCards(c,pc)
if Duel.Destroy(dg,REASON_EFFECT)~=2 then return end if Duel.Destroy(dg,REASON_EFFECT)~=2 then return end
......
...@@ -31,8 +31,8 @@ function c67754901.indfilter(c) ...@@ -31,8 +31,8 @@ function c67754901.indfilter(c)
return c:IsFaceup() and c:IsSetCard(0x99) return c:IsFaceup() and c:IsSetCard(0x99)
end end
function c67754901.indcon(e,tp,eg,ep,ev,re,r,rp) function c67754901.indcon(e,tp,eg,ep,ev,re,r,rp)
local tc1=Duel.GetFieldCard(tp,LOCATION_SZONE,6) local tc1=Duel.GetFieldCard(tp,LOCATION_PZONE,0)
local tc2=Duel.GetFieldCard(tp,LOCATION_SZONE,7) local tc2=Duel.GetFieldCard(tp,LOCATION_PZONE,1)
return (tc1 and tc1:IsSetCard(0x99)) or (tc2 and tc2:IsSetCard(0x99)) return (tc1 and tc1:IsSetCard(0x99)) or (tc2 and tc2:IsSetCard(0x99))
end end
function c67754901.indtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c67754901.indtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
...@@ -61,9 +61,6 @@ function c67754901.cfilter(c,tp) ...@@ -61,9 +61,6 @@ function c67754901.cfilter(c,tp)
return c:IsReason(REASON_BATTLE+REASON_EFFECT) and c:IsSetCard(0x99) and c:IsType(TYPE_PENDULUM) return c:IsReason(REASON_BATTLE+REASON_EFFECT) and c:IsSetCard(0x99) and c:IsType(TYPE_PENDULUM)
and c:IsPreviousLocation(LOCATION_MZONE) and c:IsPreviousPosition(POS_FACEUP) and c:GetPreviousControler()==tp and c:IsPreviousLocation(LOCATION_MZONE) and c:IsPreviousPosition(POS_FACEUP) and c:GetPreviousControler()==tp
end end
function c67754901.desfilter(c)
return (c:GetSequence()==6 or c:GetSequence()==7)
end
function c67754901.penfilter(c) function c67754901.penfilter(c)
return c:IsSetCard(0x99) and c:IsType(TYPE_PENDULUM) and c:IsFaceup() and not c:IsCode(67754901) and not c:IsForbidden() return c:IsSetCard(0x99) and c:IsType(TYPE_PENDULUM) and c:IsFaceup() and not c:IsCode(67754901) and not c:IsForbidden()
end end
...@@ -71,15 +68,15 @@ function c67754901.pencon(e,tp,eg,ep,ev,re,r,rp) ...@@ -71,15 +68,15 @@ function c67754901.pencon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c67754901.cfilter,1,nil,tp) return eg:IsExists(c67754901.cfilter,1,nil,tp)
end end
function c67754901.pentg(e,tp,eg,ep,ev,re,r,rp,chk) function c67754901.pentg(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(c67754901.desfilter,tp,LOCATION_SZONE,0,nil) if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_PZONE,0)>0
if chk==0 then return g:GetCount()>0
and Duel.IsExistingMatchingCard(c67754901.penfilter,tp,LOCATION_EXTRA,0,1,nil) end and Duel.IsExistingMatchingCard(c67754901.penfilter,tp,LOCATION_EXTRA,0,1,nil) end
local g=Duel.GetFieldGroup(tp,LOCATION_PZONE,0)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end end
function c67754901.penop(e,tp,eg,ep,ev,re,r,rp) function c67754901.penop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end if not e:GetHandler():IsRelateToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectMatchingCard(tp,c67754901.desfilter,tp,LOCATION_SZONE,0,1,1,nil) local g=Duel.GetFieldGroup(tp,LOCATION_PZONE,0):Select(tp,1,1,nil)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.HintSelection(g) Duel.HintSelection(g)
if Duel.Destroy(g,REASON_EFFECT)==0 then return end if Duel.Destroy(g,REASON_EFFECT)==0 then return end
......
...@@ -7,8 +7,7 @@ function c69512157.initial_effect(c) ...@@ -7,8 +7,7 @@ function c69512157.initial_effect(c)
e2:SetType(EFFECT_TYPE_FIELD) e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_DISABLE) e2:SetCode(EFFECT_DISABLE)
e2:SetRange(LOCATION_PZONE) e2:SetRange(LOCATION_PZONE)
e2:SetTargetRange(0,LOCATION_SZONE) e2:SetTargetRange(0,LOCATION_PZONE)
e2:SetTarget(c69512157.distg)
c:RegisterEffect(e2) c:RegisterEffect(e2)
--disable effect --disable effect
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
...@@ -18,9 +17,6 @@ function c69512157.initial_effect(c) ...@@ -18,9 +17,6 @@ function c69512157.initial_effect(c)
e3:SetOperation(c69512157.disop) e3:SetOperation(c69512157.disop)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end 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) 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) 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 if re:IsActiveType(TYPE_SPELL) and p~=tp and loc==LOCATION_SZONE and (seq==6 or seq==7) then
......
...@@ -45,7 +45,7 @@ function c69610326.pcfilter(c) ...@@ -45,7 +45,7 @@ function c69610326.pcfilter(c)
end end
function c69610326.pctg(e,tp,eg,ep,ev,re,r,rp,chk) function c69610326.pctg(e,tp,eg,ep,ev,re,r,rp,chk)
local seq=e:GetHandler():GetSequence() local seq=e:GetHandler():GetSequence()
if chk==0 then return Duel.CheckLocation(tp,LOCATION_SZONE,13-seq) if chk==0 then return Duel.CheckLocation(tp,LOCATION_PZONE,({1,0,0,0,0,0,1,0})[seq+1])
and Duel.IsExistingMatchingCard(c69610326.pcfilter,tp,LOCATION_DECK,0,1,nil) end and Duel.IsExistingMatchingCard(c69610326.pcfilter,tp,LOCATION_DECK,0,1,nil) end
end end
function c69610326.pcop(e,tp,eg,ep,ev,re,r,rp) function c69610326.pcop(e,tp,eg,ep,ev,re,r,rp)
...@@ -60,7 +60,7 @@ function c69610326.pcop(e,tp,eg,ep,ev,re,r,rp) ...@@ -60,7 +60,7 @@ function c69610326.pcop(e,tp,eg,ep,ev,re,r,rp)
e1:SetReset(RESET_PHASE+PHASE_END) e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp) Duel.RegisterEffect(e1,tp)
local seq=c:GetSequence() local seq=c:GetSequence()
if not Duel.CheckLocation(tp,LOCATION_SZONE,13-seq) then return end if not Duel.CheckLocation(tp,LOCATION_PZONE,({1,0,0,0,0,0,1,0})[seq+1]) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD)
local g=Duel.SelectMatchingCard(tp,c69610326.pcfilter,tp,LOCATION_DECK,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,c69610326.pcfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then if g:GetCount()>0 then
......
...@@ -9,14 +9,11 @@ function c69982329.initial_effect(c) ...@@ -9,14 +9,11 @@ function c69982329.initial_effect(c)
e1:SetOperation(c69982329.activate) e1:SetOperation(c69982329.activate)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end 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) 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 chkc then return chkc:IsLocation(LOCATION_PZONE) end
if chk==0 then return Duel.IsExistingTarget(c69982329.filter,tp,LOCATION_SZONE,LOCATION_SZONE,1,nil) end if chk==0 then return Duel.IsExistingTarget(nil,tp,LOCATION_PZONE,LOCATION_PZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g=Duel.SelectTarget(tp,c69982329.filter,tp,LOCATION_SZONE,LOCATION_SZONE,1,1,nil) local g=Duel.SelectTarget(tp,nil,tp,LOCATION_PZONE,LOCATION_PZONE,1,1,nil)
local tc=g:GetFirst() local tc=g:GetFirst()
local t={} local t={}
local p=1 local p=1
......
...@@ -24,7 +24,7 @@ function c72714461.initial_effect(c) ...@@ -24,7 +24,7 @@ function c72714461.initial_effect(c)
end end
function c72714461.pencon(e,tp,eg,ep,ev,re,r,rp) function c72714461.pencon(e,tp,eg,ep,ev,re,r,rp)
local seq=e:GetHandler():GetSequence() local seq=e:GetHandler():GetSequence()
local sc=Duel.GetFieldCard(tp,LOCATION_SZONE,13-seq) local sc=Duel.GetFieldCard(tp,LOCATION_PZONE,({1,0,0,0,0,0,1,0})[seq+1])
return sc and (sc:IsSetCard(0x98) or sc:IsSetCard(0x9f)) return sc and (sc:IsSetCard(0x98) or sc:IsSetCard(0x9f))
end end
function c72714461.penfilter(c) function c72714461.penfilter(c)
...@@ -51,14 +51,13 @@ function c72714461.sccost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -51,14 +51,13 @@ function c72714461.sccost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SendtoGrave(e:GetHandler(),REASON_DISCARD+REASON_COST) Duel.SendtoGrave(e:GetHandler(),REASON_DISCARD+REASON_COST)
end end
function c72714461.scfilter(c) function c72714461.scfilter(c)
return (c:GetSequence()==6 and c:GetLeftScale()~=c:GetOriginalLeftScale()) return c:GetLeftScale()~=c:GetOriginalLeftScale()
or (c:GetSequence()==7 and c:GetRightScale()~=c:GetOriginalRightScale())
end end
function c72714461.sctg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) 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 chkc then return chkc:IsLocation(LOCATION_PZONE) 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 if chk==0 then return Duel.IsExistingTarget(c72714461.scfilter,tp,LOCATION_PZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
Duel.SelectTarget(tp,c72714461.scfilter,tp,LOCATION_SZONE,0,1,1,nil) Duel.SelectTarget(tp,c72714461.scfilter,tp,LOCATION_PZONE,0,1,1,nil)
end end
function c72714461.scop(e,tp,eg,ep,ev,re,r,rp) function c72714461.scop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
......
...@@ -26,7 +26,7 @@ function c73130445.initial_effect(c) ...@@ -26,7 +26,7 @@ function c73130445.initial_effect(c)
end end
function c73130445.destg(e,tp,eg,ep,ev,re,r,rp,chk) function c73130445.destg(e,tp,eg,ep,ev,re,r,rp,chk)
local seq=e:GetHandler():GetSequence() local seq=e:GetHandler():GetSequence()
local tc=Duel.GetFieldCard(tp,LOCATION_SZONE,13-seq) local tc=Duel.GetFieldCard(tp,LOCATION_PZONE,({1,0,0,0,0,0,1,0})[seq+1])
if chk==0 then return Duel.IsPlayerCanDraw(tp,1) 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 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) Duel.SetOperationInfo(0,CATEGORY_DESTROY,e:GetHandler(),1,0,0)
......
...@@ -31,11 +31,9 @@ function c74850403.evalue(e,re,rp) ...@@ -31,11 +31,9 @@ function c74850403.evalue(e,re,rp)
return re:IsActiveType(TYPE_SPELL) and rp~=e:GetHandlerPlayer() return re:IsActiveType(TYPE_SPELL) and rp~=e:GetHandlerPlayer()
end end
function c74850403.thcfilter(c,tp) function c74850403.thcfilter(c,tp)
local pl=c:GetPreviousLocation()
local ps=c:GetPreviousSequence()
return c:IsType(TYPE_PENDULUM) and c:IsPreviousSetCard(0x98) return c:IsType(TYPE_PENDULUM) and c:IsPreviousSetCard(0x98)
and c:GetPreviousControler()==tp and c:IsPreviousPosition(POS_FACEUP) and c:GetPreviousControler()==tp and c:IsPreviousPosition(POS_FACEUP)
and (pl==LOCATION_MZONE or (pl==LOCATION_SZONE and (ps==6 or ps==7))) and c:IsPreviousLocation(LOCATION_MZONE+LOCATION_PZONE)
end end
function c74850403.thcon(e,tp,eg,ep,ev,re,r,rp) function c74850403.thcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c74850403.thcfilter,1,nil,tp) return eg:IsExists(c74850403.thcfilter,1,nil,tp)
......
...@@ -14,14 +14,11 @@ function c75195825.initial_effect(c) ...@@ -14,14 +14,11 @@ function c75195825.initial_effect(c)
e2:SetOperation(c75195825.scop) e2:SetOperation(c75195825.scop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c75195825.filter(c)
return (c:GetSequence()==6 or c:GetSequence()==7)
end
function c75195825.sctg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c75195825.sctg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_SZONE) and c75195825.filter(chkc) end if chkc then return chkc:IsLocation(LOCATION_PZONE) end
if chk==0 then return Duel.IsExistingTarget(c75195825.filter,tp,LOCATION_SZONE,LOCATION_SZONE,1,nil) end if chk==0 then return Duel.IsExistingTarget(nil,tp,LOCATION_PZONE,LOCATION_PZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,c75195825.filter,tp,LOCATION_SZONE,LOCATION_SZONE,1,1,nil) local g=Duel.SelectTarget(tp,nil,tp,LOCATION_PZONE,LOCATION_PZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end end
function c75195825.scop(e,tp,eg,ep,ev,re,r,rp) function c75195825.scop(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -12,15 +12,15 @@ function c76660409.initial_effect(c) ...@@ -12,15 +12,15 @@ function c76660409.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c76660409.condition(e,tp,eg,ep,ev,re,r,rp) 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) return Duel.GetFieldCard(tp,LOCATION_PZONE,0) and Duel.GetFieldCard(tp,LOCATION_PZONE,1)
end end
function c76660409.filter(c,lsc,rsc) function c76660409.filter(c,lsc,rsc)
local lv=c:GetLevel() local lv=c:GetLevel()
return lv>lsc and lv<rsc and c:IsAbleToHand() return lv>lsc and lv<rsc and c:IsAbleToHand()
end end
function c76660409.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c76660409.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local lsc=Duel.GetFieldCard(tp,LOCATION_SZONE,6):GetLeftScale() local lsc=Duel.GetFieldCard(tp,LOCATION_PZONE,0):GetLeftScale()
local rsc=Duel.GetFieldCard(tp,LOCATION_SZONE,7):GetRightScale() local rsc=Duel.GetFieldCard(tp,LOCATION_PZONE,1):GetRightScale()
if lsc>rsc then lsc,rsc=rsc,lsc end if lsc>rsc 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 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 if chk==0 then return Duel.IsExistingTarget(c76660409.filter,tp,LOCATION_GRAVE,0,2,nil,lsc,rsc) end
......
...@@ -79,8 +79,8 @@ function c78949372.drop(e,tp,eg,ep,ev,re,r,rp) ...@@ -79,8 +79,8 @@ function c78949372.drop(e,tp,eg,ep,ev,re,r,rp)
end end
function c78949372.tgcon(e) function c78949372.tgcon(e)
local tp=e:GetHandlerPlayer() local tp=e:GetHandlerPlayer()
local tc1=Duel.GetFieldCard(tp,LOCATION_SZONE,6) local tc1=Duel.GetFieldCard(tp,LOCATION_PZONE,0)
local tc2=Duel.GetFieldCard(tp,LOCATION_SZONE,7) local tc2=Duel.GetFieldCard(tp,LOCATION_PZONE,1)
return (tc1 and tc1:IsSetCard(0xd0)) or (tc2 and tc2:IsSetCard(0xd0)) return (tc1 and tc1:IsSetCard(0xd0)) or (tc2 and tc2:IsSetCard(0xd0))
end end
function c78949372.effectfilter(e,ct) function c78949372.effectfilter(e,ct)
......
...@@ -26,14 +26,14 @@ function c80696379.initial_effect(c) ...@@ -26,14 +26,14 @@ function c80696379.initial_effect(c)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c80696379.filter(c,e,tp) function c80696379.filter(c,e,tp)
return (c:GetSequence()==6 or c:GetSequence()==7) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function c80696379.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) 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 chkc then return chkc:IsLocation(LOCATION_PZONE) and chkc:IsControler(tp) and c80696379.filter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 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 and Duel.IsExistingTarget(c80696379.filter,tp,LOCATION_PZONE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c80696379.filter,tp,LOCATION_SZONE,0,1,1,nil,e,tp) local g=Duel.SelectTarget(tp,c80696379.filter,tp,LOCATION_PZONE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end end
function c80696379.spop(e,tp,eg,ep,ev,re,r,rp) function c80696379.spop(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -244,10 +244,10 @@ function c80896940.pencon(e,tp,eg,ep,ev,re,r,rp) ...@@ -244,10 +244,10 @@ function c80896940.pencon(e,tp,eg,ep,ev,re,r,rp)
return bit.band(r,REASON_EFFECT+REASON_BATTLE)~=0 and c:IsPreviousLocation(LOCATION_MZONE) and c:IsFaceup() return bit.band(r,REASON_EFFECT+REASON_BATTLE)~=0 and c:IsPreviousLocation(LOCATION_MZONE) and c:IsFaceup()
end end
function c80896940.pentg(e,tp,eg,ep,ev,re,r,rp,chk) function c80896940.pentg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckLocation(tp,LOCATION_SZONE,6) or Duel.CheckLocation(tp,LOCATION_SZONE,7) end if chk==0 then return Duel.CheckLocation(tp,LOCATION_PZONE,0) or Duel.CheckLocation(tp,LOCATION_PZONE,1) end
end end
function c80896940.penop(e,tp,eg,ep,ev,re,r,rp) function c80896940.penop(e,tp,eg,ep,ev,re,r,rp)
if not Duel.CheckLocation(tp,LOCATION_SZONE,6) and not Duel.CheckLocation(tp,LOCATION_SZONE,7) then return false end if not Duel.CheckLocation(tp,LOCATION_PZONE,0) and not Duel.CheckLocation(tp,LOCATION_PZONE,1) then return false end
local c=e:GetHandler() local c=e:GetHandler()
if c:IsRelateToEffect(e) then if c:IsRelateToEffect(e) then
Duel.MoveToField(c,tp,tp,LOCATION_SZONE,POS_FACEUP,true) Duel.MoveToField(c,tp,tp,LOCATION_SZONE,POS_FACEUP,true)
......
...@@ -62,7 +62,7 @@ function c81571633.atkop(e,tp,eg,ep,ev,re,r,rp) ...@@ -62,7 +62,7 @@ function c81571633.atkop(e,tp,eg,ep,ev,re,r,rp)
end end
function c81571633.sccon(e) function c81571633.sccon(e)
local seq=e:GetHandler():GetSequence() local seq=e:GetHandler():GetSequence()
local tc=Duel.GetFieldCard(e:GetHandlerPlayer(),LOCATION_SZONE,13-seq) local tc=Duel.GetFieldCard(e:GetHandlerPlayer(),LOCATION_PZONE,({1,0,0,0,0,0,1,0})[seq+1])
return not tc or not tc:IsSetCard(0xaf) return not tc or not tc:IsSetCard(0xaf)
end end
function c81571633.filter(c,e,tp) function c81571633.filter(c,e,tp)
......
...@@ -9,19 +9,16 @@ function c83461421.initial_effect(c) ...@@ -9,19 +9,16 @@ function c83461421.initial_effect(c)
e1:SetOperation(c83461421.activate) e1:SetOperation(c83461421.activate)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c83461421.filter(c)
return (c:GetSequence()==6 or c:GetSequence()==7)
end
function c83461421.filter2(c) function c83461421.filter2(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP) return c:IsType(TYPE_SPELL+TYPE_TRAP)
end end
function c83461421.target(e,tp,eg,ep,ev,re,r,rp,chk) function c83461421.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c83461421.filter,tp,LOCATION_SZONE,LOCATION_SZONE,1,nil) end if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_PZONE,LOCATION_PZONE)>0 end
local g=Duel.GetMatchingGroup(c83461421.filter,tp,LOCATION_SZONE,LOCATION_SZONE,nil) local g=Duel.GetFieldGroup(tp,LOCATION_PZONE,LOCATION_PZONE)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0)
end end
function c83461421.activate(e,tp,eg,ep,ev,re,r,rp) function c83461421.activate(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c83461421.filter,tp,LOCATION_SZONE,LOCATION_SZONE,nil) local g=Duel.GetFieldGroup(tp,LOCATION_PZONE,LOCATION_PZONE)
if Duel.Destroy(g,REASON_EFFECT)~=0 then if Duel.Destroy(g,REASON_EFFECT)~=0 then
local dg=Duel.GetMatchingGroup(c83461421.filter2,tp,0,LOCATION_ONFIELD,nil) local dg=Duel.GetMatchingGroup(c83461421.filter2,tp,0,LOCATION_ONFIELD,nil)
if dg:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(83461421,0)) then if dg:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(83461421,0)) then
......
...@@ -52,15 +52,12 @@ end ...@@ -52,15 +52,12 @@ end
function c85101097.ctlcon(e,tp,eg,ep,ev,re,r,rp) function c85101097.ctlcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==tp return Duel.GetTurnPlayer()==tp
end end
function c85101097.filter(c)
return (c:GetSequence()==6 or c:GetSequence()==7)
end
function c85101097.ctltg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) 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 chkc then return chkc:IsLocation(LOCATION_PZONE) and chkc:IsControler(tp) end
if chk==0 then return e:GetHandler():IsControlerCanBeChanged() if chk==0 then return e:GetHandler():IsControlerCanBeChanged()
and Duel.IsExistingTarget(c85101097.filter,tp,LOCATION_SZONE,0,1,nil) end and Duel.IsExistingTarget(nil,tp,LOCATION_PZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,c85101097.filter,tp,LOCATION_SZONE,0,1,1,nil) local g=Duel.SelectTarget(tp,nil,tp,LOCATION_PZONE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_CONTROL,e:GetHandler(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_CONTROL,e:GetHandler(),1,0,0)
end end
......
...@@ -64,13 +64,13 @@ function c86238081.pcfilter(c) ...@@ -64,13 +64,13 @@ function c86238081.pcfilter(c)
end end
function c86238081.pctg(e,tp,eg,ep,ev,re,r,rp,chk) function c86238081.pctg(e,tp,eg,ep,ev,re,r,rp,chk)
local seq=e:GetHandler():GetSequence() local seq=e:GetHandler():GetSequence()
if chk==0 then return Duel.CheckLocation(tp,LOCATION_SZONE,13-seq) if chk==0 then return Duel.CheckLocation(tp,LOCATION_PZONE,({1,0,0,0,0,0,1,0})[seq+1])
and Duel.IsExistingMatchingCard(c86238081.pcfilter,tp,LOCATION_DECK,0,1,nil) end and Duel.IsExistingMatchingCard(c86238081.pcfilter,tp,LOCATION_DECK,0,1,nil) end
end end
function c86238081.pcop(e,tp,eg,ep,ev,re,r,rp) function c86238081.pcop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end if not e:GetHandler():IsRelateToEffect(e) then return end
local seq=e:GetHandler():GetSequence() local seq=e:GetHandler():GetSequence()
if not Duel.CheckLocation(tp,LOCATION_SZONE,13-seq) then return end if not Duel.CheckLocation(tp,LOCATION_PZONE,({1,0,0,0,0,0,1,0})[seq+1]) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD)
local g=Duel.SelectMatchingCard(tp,c86238081.pcfilter,tp,LOCATION_DECK,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,c86238081.pcfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then if g:GetCount()>0 then
...@@ -123,10 +123,10 @@ function c86238081.pencon(e,tp,eg,ep,ev,re,r,rp) ...@@ -123,10 +123,10 @@ function c86238081.pencon(e,tp,eg,ep,ev,re,r,rp)
return c:IsPreviousLocation(LOCATION_MZONE) and c:IsFaceup() return c:IsPreviousLocation(LOCATION_MZONE) and c:IsFaceup()
end end
function c86238081.pentg(e,tp,eg,ep,ev,re,r,rp,chk) function c86238081.pentg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckLocation(tp,LOCATION_SZONE,6) or Duel.CheckLocation(tp,LOCATION_SZONE,7) end if chk==0 then return Duel.CheckLocation(tp,LOCATION_PZONE,0) or Duel.CheckLocation(tp,LOCATION_PZONE,1) end
end end
function c86238081.penop(e,tp,eg,ep,ev,re,r,rp) function c86238081.penop(e,tp,eg,ep,ev,re,r,rp)
if not Duel.CheckLocation(tp,LOCATION_SZONE,6) and not Duel.CheckLocation(tp,LOCATION_SZONE,7) then return false end if not Duel.CheckLocation(tp,LOCATION_PZONE,0) and not Duel.CheckLocation(tp,LOCATION_PZONE,1) then return false end
local c=e:GetHandler() local c=e:GetHandler()
if c:IsRelateToEffect(e) then if c:IsRelateToEffect(e) then
Duel.MoveToField(c,tp,tp,LOCATION_SZONE,POS_FACEUP,true) Duel.MoveToField(c,tp,tp,LOCATION_SZONE,POS_FACEUP,true)
......
...@@ -46,7 +46,7 @@ function c88412339.penfilter(c) ...@@ -46,7 +46,7 @@ function c88412339.penfilter(c)
end end
function c88412339.pentg(e,tp,eg,ep,ev,re,r,rp,chk) function c88412339.pentg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c88412339.penfilter,tp,LOCATION_DECK,0,1,nil) if chk==0 then return Duel.IsExistingMatchingCard(c88412339.penfilter,tp,LOCATION_DECK,0,1,nil)
and (Duel.CheckLocation(tp,LOCATION_SZONE,6) or Duel.CheckLocation(tp,LOCATION_SZONE,7)) end and (Duel.CheckLocation(tp,LOCATION_PZONE,0) or Duel.CheckLocation(tp,LOCATION_PZONE,1)) end
end end
function c88412339.penop(e,tp,eg,ep,ev,re,r,rp) function c88412339.penop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD)
......
...@@ -31,15 +31,13 @@ function c88757791.initial_effect(c) ...@@ -31,15 +31,13 @@ function c88757791.initial_effect(c)
end end
function c88757791.cfilter(c,tp) function c88757791.cfilter(c,tp)
return c:IsType(TYPE_PENDULUM) and not c:IsPublic() return c:IsType(TYPE_PENDULUM) and not c:IsPublic()
and Duel.IsExistingTarget(c88757791.scfilter,tp,LOCATION_SZONE,0,1,nil,c) and Duel.IsExistingTarget(c88757791.scfilter,tp,LOCATION_PZONE,0,1,nil,c)
end end
function c88757791.scfilter(c,pc) function c88757791.scfilter(c,pc)
return c:IsSetCard(0x98) return c:IsSetCard(0x98) and c:GetLeftScale()~=pc:GetLeftScale()
and ((c:GetSequence()==6 and c:GetLeftScale()~=pc:GetLeftScale())
or (c:GetSequence()==7 and c:GetRightScale()~=pc:GetRightScale()))
end end
function c88757791.sctg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) 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 chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_PZONE) and c88757791.scfilter(chkc,e:GetLabelObject()) end
if chk==0 then return Duel.IsExistingMatchingCard(c88757791.cfilter,tp,LOCATION_HAND,0,1,nil,tp) 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) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM)
local cg=Duel.SelectMatchingCard(tp,c88757791.cfilter,tp,LOCATION_HAND,0,1,1,nil,tp) local cg=Duel.SelectMatchingCard(tp,c88757791.cfilter,tp,LOCATION_HAND,0,1,1,nil,tp)
...@@ -47,7 +45,7 @@ function c88757791.sctg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -47,7 +45,7 @@ function c88757791.sctg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
Duel.ShuffleHand(tp) Duel.ShuffleHand(tp)
e:SetLabelObject(cg:GetFirst()) e:SetLabelObject(cg:GetFirst())
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
Duel.SelectTarget(tp,c88757791.scfilter,tp,LOCATION_SZONE,0,1,1,nil,cg:GetFirst()) Duel.SelectTarget(tp,c88757791.scfilter,tp,LOCATION_PZONE,0,1,1,nil,cg:GetFirst())
end end
function c88757791.scop(e,tp,eg,ep,ev,re,r,rp) function c88757791.scop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end if not e:GetHandler():IsRelateToEffect(e) then return end
......
...@@ -46,7 +46,7 @@ function c88935103.initial_effect(c) ...@@ -46,7 +46,7 @@ function c88935103.initial_effect(c)
end end
function c88935103.descon(e) function c88935103.descon(e)
local seq=e:GetHandler():GetSequence() local seq=e:GetHandler():GetSequence()
local tc=Duel.GetFieldCard(e:GetHandlerPlayer(),LOCATION_SZONE,13-seq) local tc=Duel.GetFieldCard(e:GetHandlerPlayer(),LOCATION_PZONE,({1,0,0,0,0,0,1,0})[seq+1])
return not tc or not tc:IsSetCard(0x98) return not tc or not tc:IsSetCard(0x98)
end end
function c88935103.synlimit(e,c) function c88935103.synlimit(e,c)
......
...@@ -115,10 +115,10 @@ function c90036274.pencon(e,tp,eg,ep,ev,re,r,rp) ...@@ -115,10 +115,10 @@ function c90036274.pencon(e,tp,eg,ep,ev,re,r,rp)
return bit.band(r,REASON_EFFECT+REASON_BATTLE)~=0 and c:IsPreviousLocation(LOCATION_MZONE) and c:IsFaceup() return bit.band(r,REASON_EFFECT+REASON_BATTLE)~=0 and c:IsPreviousLocation(LOCATION_MZONE) and c:IsFaceup()
end end
function c90036274.pentg(e,tp,eg,ep,ev,re,r,rp,chk) function c90036274.pentg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckLocation(tp,LOCATION_SZONE,6) or Duel.CheckLocation(tp,LOCATION_SZONE,7) end if chk==0 then return Duel.CheckLocation(tp,LOCATION_PZONE,0) or Duel.CheckLocation(tp,LOCATION_PZONE,1) end
end end
function c90036274.penop(e,tp,eg,ep,ev,re,r,rp) function c90036274.penop(e,tp,eg,ep,ev,re,r,rp)
if not Duel.CheckLocation(tp,LOCATION_SZONE,6) and not Duel.CheckLocation(tp,LOCATION_SZONE,7) then return false end if not Duel.CheckLocation(tp,LOCATION_PZONE,0) and not Duel.CheckLocation(tp,LOCATION_PZONE,1) then return false end
local c=e:GetHandler() local c=e:GetHandler()
if c:IsRelateToEffect(e) then if c:IsRelateToEffect(e) then
Duel.MoveToField(c,tp,tp,LOCATION_SZONE,POS_FACEUP,true) Duel.MoveToField(c,tp,tp,LOCATION_SZONE,POS_FACEUP,true)
......
...@@ -49,8 +49,8 @@ function c9030160.initial_effect(c) ...@@ -49,8 +49,8 @@ function c9030160.initial_effect(c)
end end
function c9030160.condition(e) function c9030160.condition(e)
local tp=e:GetHandlerPlayer() local tp=e:GetHandlerPlayer()
local pc1=Duel.GetFieldCard(tp,LOCATION_SZONE,6) local pc1=Duel.GetFieldCard(tp,LOCATION_PZONE,0)
local pc2=Duel.GetFieldCard(tp,LOCATION_SZONE,7) local pc2=Duel.GetFieldCard(tp,LOCATION_PZONE,1)
return pc1 and pc2 and pc1:IsSetCard(0xaf) and pc2:IsSetCard(0xaf) return pc1 and pc2 and pc1:IsSetCard(0xaf) and pc2:IsSetCard(0xaf)
end end
function c9030160.sumlimit(e,c) function c9030160.sumlimit(e,c)
......
...@@ -31,7 +31,7 @@ function c91420254.initial_effect(c) ...@@ -31,7 +31,7 @@ function c91420254.initial_effect(c)
end end
function c91420254.sccon(e,tp,eg,ep,ev,re,r,rp) function c91420254.sccon(e,tp,eg,ep,ev,re,r,rp)
local seq=e:GetHandler():GetSequence() local seq=e:GetHandler():GetSequence()
local tc=Duel.GetFieldCard(e:GetHandlerPlayer(),LOCATION_SZONE,13-seq) local tc=Duel.GetFieldCard(e:GetHandlerPlayer(),LOCATION_PZONE,({1,0,0,0,0,0,1,0})[seq+1])
return tc and tc:IsSetCard(0xb3) return tc and tc:IsSetCard(0xb3)
end end
function c91420254.scop(e,tp,eg,ep,ev,re,r,rp) function c91420254.scop(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -28,14 +28,14 @@ function c92746535.initial_effect(c) ...@@ -28,14 +28,14 @@ function c92746535.initial_effect(c)
end end
function c92746535.thcon(e,tp,eg,ep,ev,re,r,rp) function c92746535.thcon(e,tp,eg,ep,ev,re,r,rp)
local seq=e:GetHandler():GetSequence() local seq=e:GetHandler():GetSequence()
return Duel.GetFieldCard(tp,LOCATION_SZONE,13-seq) return Duel.GetFieldCard(tp,LOCATION_PZONE,({1,0,0,0,0,0,1,0})[seq+1])
end end
function c92746535.thfilter(c,code) function c92746535.thfilter(c,code)
return c:IsCode(code) and c:IsAbleToHand() return c:IsCode(code) and c:IsAbleToHand()
end end
function c92746535.thtg(e,tp,eg,ep,ev,re,r,rp,chk) function c92746535.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
local seq=e:GetHandler():GetSequence() local seq=e:GetHandler():GetSequence()
local sc=Duel.GetFieldCard(tp,LOCATION_SZONE,13-seq) local sc=Duel.GetFieldCard(tp,LOCATION_PZONE,({1,0,0,0,0,0,1,0})[seq+1])
if chk==0 then return Duel.IsExistingMatchingCard(c92746535.thfilter,tp,LOCATION_DECK,0,1,nil,sc:GetOriginalCode()) end if chk==0 then return Duel.IsExistingMatchingCard(c92746535.thfilter,tp,LOCATION_DECK,0,1,nil,sc:GetOriginalCode()) end
Duel.SetTargetCard(sc) Duel.SetTargetCard(sc)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,sc,1,0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,sc,1,0,0)
......
...@@ -28,7 +28,7 @@ function c93149655.initial_effect(c) ...@@ -28,7 +28,7 @@ function c93149655.initial_effect(c)
end end
function c93149655.atkcon(e,tp,eg,ep,ev,re,r,rp) function c93149655.atkcon(e,tp,eg,ep,ev,re,r,rp)
local seq=e:GetHandler():GetSequence() local seq=e:GetHandler():GetSequence()
local tc=Duel.GetFieldCard(tp,LOCATION_SZONE,13-seq) local tc=Duel.GetFieldCard(tp,LOCATION_PZONE,({1,0,0,0,0,0,1,0})[seq+1])
if not tc or not tc:IsSetCard(0x99) then return end if not tc or not tc:IsSetCard(0x99) then return end
local a=Duel.GetAttacker() local a=Duel.GetAttacker()
local d=Duel.GetAttackTarget() local d=Duel.GetAttackTarget()
...@@ -61,15 +61,15 @@ function c93149655.damcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -61,15 +61,15 @@ function c93149655.damcon(e,tp,eg,ep,ev,re,r,rp)
and Duel.GetAttacker()==e:GetHandler() and Duel.GetAttacker()==e:GetHandler()
end end
function c93149655.damfilter(c) function c93149655.damfilter(c)
return c:IsFaceup() and (c:GetSequence()==6 or c:GetSequence()==7) and c:IsSetCard(0x99) return c:IsFaceup() and c:IsSetCard(0x99)
end end
function c93149655.damtg(e,tp,eg,ep,ev,re,r,rp,chk) function c93149655.damtg(e,tp,eg,ep,ev,re,r,rp,chk)
local ct=Duel.GetMatchingGroupCount(c93149655.damfilter,tp,LOCATION_SZONE,0,nil) local ct=Duel.GetMatchingGroupCount(c93149655.damfilter,tp,LOCATION_PZONE,0,nil)
if chk==0 then return ct>0 end if chk==0 then return ct>0 end
Duel.SetTargetParam(ct*1200) Duel.SetTargetParam(ct*1200)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,ct*1200) Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,ct*1200)
end end
function c93149655.damop(e,tp,eg,ep,ev,re,r,rp) function c93149655.damop(e,tp,eg,ep,ev,re,r,rp)
local ct=Duel.GetMatchingGroupCount(c93149655.damfilter,tp,LOCATION_SZONE,0,nil) local ct=Duel.GetMatchingGroupCount(c93149655.damfilter,tp,LOCATION_PZONE,0,nil)
Duel.Damage(1-tp,ct*1200,REASON_EFFECT) Duel.Damage(1-tp,ct*1200,REASON_EFFECT)
end end
...@@ -14,7 +14,7 @@ function c93662626.initial_effect(c) ...@@ -14,7 +14,7 @@ function c93662626.initial_effect(c)
end end
function c93662626.thcon(e,tp,eg,ep,ev,re,r,rp) function c93662626.thcon(e,tp,eg,ep,ev,re,r,rp)
local seq=e:GetHandler():GetSequence() local seq=e:GetHandler():GetSequence()
local pc=Duel.GetFieldCard(tp,LOCATION_SZONE,13-seq) local pc=Duel.GetFieldCard(tp,LOCATION_PZONE,({1,0,0,0,0,0,1,0})[seq+1])
return pc and pc:IsSetCard(0xc8) return pc and pc:IsSetCard(0xc8)
end end
function c93662626.filter(c) function c93662626.filter(c)
...@@ -22,7 +22,7 @@ function c93662626.filter(c) ...@@ -22,7 +22,7 @@ function c93662626.filter(c)
end end
function c93662626.thtg(e,tp,eg,ep,ev,re,r,rp,chk) function c93662626.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
local pc=Duel.GetFieldCard(tp,LOCATION_SZONE,13-c:GetSequence()) local pc=Duel.GetFieldCard(tp,LOCATION_PZONE,({1,0,0,0,0,0,1,0})[c:GetSequence()+1])
if chk==0 then return Duel.IsExistingMatchingCard(c93662626.filter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(c93662626.filter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end
local g=Group.FromCards(c,pc) local g=Group.FromCards(c,pc)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,2,0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,2,0,0)
...@@ -31,7 +31,7 @@ end ...@@ -31,7 +31,7 @@ end
function c93662626.thop(e,tp,eg,ep,ev,re,r,rp) function c93662626.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end if not c:IsRelateToEffect(e) then return end
local pc=Duel.GetFieldCard(tp,LOCATION_SZONE,13-c:GetSequence()) local pc=Duel.GetFieldCard(tp,LOCATION_PZONE,({1,0,0,0,0,0,1,0})[c:GetSequence()+1])
if not pc then return end if not pc then return end
local dg=Group.FromCards(c,pc) local dg=Group.FromCards(c,pc)
if Duel.Destroy(dg,REASON_EFFECT)~=2 then return end if Duel.Destroy(dg,REASON_EFFECT)~=2 then return end
......
...@@ -35,15 +35,14 @@ function c95401059.condition1(e,tp,eg,ep,ev,re,r,rp) ...@@ -35,15 +35,14 @@ function c95401059.condition1(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetSummonType()==SUMMON_TYPE_PENDULUM return e:GetHandler():GetSummonType()==SUMMON_TYPE_PENDULUM
end end
function c95401059.filter(c,e,tp) function c95401059.filter(c,e,tp)
return (c:GetSequence()==6 or c:GetSequence()==7) return c:IsSetCard(0xc4) and not c:IsCode(95401059) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
and c:IsSetCard(0xc4) and not c:IsCode(95401059) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function c95401059.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) 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 chkc then return chkc:IsLocation(LOCATION_PZONE) and chkc:IsControler(tp) and c95401059.filter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 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 and Duel.IsExistingTarget(c95401059.filter,tp,LOCATION_PZONE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c95401059.filter,tp,LOCATION_SZONE,0,1,1,nil,e,tp) local g=Duel.SelectTarget(tp,c95401059.filter,tp,LOCATION_PZONE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end end
function c95401059.operation(e,tp,eg,ep,ev,re,r,rp) function c95401059.operation(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -41,7 +41,7 @@ function c96073342.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -41,7 +41,7 @@ function c96073342.activate(e,tp,eg,ep,ev,re,r,rp)
end end
function c96073342.handcon(e) function c96073342.handcon(e)
local tp=e:GetHandlerPlayer() local tp=e:GetHandlerPlayer()
local tc1=Duel.GetFieldCard(tp,LOCATION_SZONE,6) local tc1=Duel.GetFieldCard(tp,LOCATION_PZONE,0)
local tc2=Duel.GetFieldCard(tp,LOCATION_SZONE,7) local tc2=Duel.GetFieldCard(tp,LOCATION_PZONE,1)
return tc1 and tc1:IsSetCard(0xc4) and tc2 and tc2:IsSetCard(0xc4) return tc1 and tc1:IsSetCard(0xc4) and tc2 and tc2:IsSetCard(0xc4)
end end
...@@ -37,19 +37,17 @@ function c96223501.condition(e,tp,eg,ep,ev,re,r,rp) ...@@ -37,19 +37,17 @@ function c96223501.condition(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetSummonType()==SUMMON_TYPE_PENDULUM return e:GetHandler():GetSummonType()==SUMMON_TYPE_PENDULUM
end end
function c96223501.filter1(c) function c96223501.filter1(c)
return ((c:IsLocation(LOCATION_MZONE) and c:IsFaceup()) return c:IsFaceup() and (c:IsSetCard(0x9c) or c:IsSetCard(0xc4))
or (c:IsLocation(LOCATION_SZONE) and (c:GetSequence()==6 or c:GetSequence()==7)))
and (c:IsSetCard(0x9c) or c:IsSetCard(0xc4))
end end
function c96223501.filter2(c) function c96223501.filter2(c)
return c:IsFaceup() return c:IsFaceup()
end end
function c96223501.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c96223501.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return false end if chkc then return false end
if chk==0 then return Duel.IsExistingTarget(c96223501.filter1,tp,LOCATION_ONFIELD,0,1,e:GetHandler()) if chk==0 then return Duel.IsExistingTarget(c96223501.filter1,tp,LOCATION_MZONE+LOCATION_PZONE,0,1,e:GetHandler())
and Duel.IsExistingTarget(c96223501.filter2,tp,0,LOCATION_ONFIELD,1,nil) end and Duel.IsExistingTarget(c96223501.filter2,tp,0,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g1=Duel.SelectTarget(tp,c96223501.filter1,tp,LOCATION_ONFIELD,0,1,1,e:GetHandler()) local g1=Duel.SelectTarget(tp,c96223501.filter1,tp,LOCATION_MZONE+LOCATION_PZONE,0,1,1,e:GetHandler())
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g2=Duel.SelectTarget(tp,c96223501.filter2,tp,0,LOCATION_ONFIELD,1,1,nil) local g2=Duel.SelectTarget(tp,c96223501.filter2,tp,0,LOCATION_ONFIELD,1,1,nil)
g1:Merge(g2) g1:Merge(g2)
......
...@@ -55,7 +55,7 @@ function c96227613.ndcon(e) ...@@ -55,7 +55,7 @@ function c96227613.ndcon(e)
end end
function c96227613.thcon(e,tp,eg,ep,ev,re,r,rp) function c96227613.thcon(e,tp,eg,ep,ev,re,r,rp)
local seq=e:GetHandler():GetSequence() local seq=e:GetHandler():GetSequence()
local pc=Duel.GetFieldCard(tp,LOCATION_SZONE,13-seq) local pc=Duel.GetFieldCard(tp,LOCATION_PZONE,({1,0,0,0,0,0,1,0})[seq+1])
return pc and pc:IsCode(22211622) return pc and pc:IsCode(22211622)
end end
function c96227613.thfilter(c) function c96227613.thfilter(c)
...@@ -64,7 +64,7 @@ end ...@@ -64,7 +64,7 @@ end
function c96227613.thtg(e,tp,eg,ep,ev,re,r,rp,chk) function c96227613.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c96227613.thfilter,tp,LOCATION_DECK,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(c96227613.thfilter,tp,LOCATION_DECK,0,1,nil) end
local c=e:GetHandler() local c=e:GetHandler()
local pc=Duel.GetFieldCard(tp,LOCATION_SZONE,13-c:GetSequence()) local pc=Duel.GetFieldCard(tp,LOCATION_PZONE,({1,0,0,0,0,0,1,0})[c:GetSequence()+1])
local g=Group.FromCards(c,pc) local g=Group.FromCards(c,pc)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,2,0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,2,0,0)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
...@@ -72,7 +72,7 @@ end ...@@ -72,7 +72,7 @@ end
function c96227613.thop(e,tp,eg,ep,ev,re,r,rp) function c96227613.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end if not c:IsRelateToEffect(e) then return end
local pc=Duel.GetFieldCard(tp,LOCATION_SZONE,13-c:GetSequence()) local pc=Duel.GetFieldCard(tp,LOCATION_PZONE,({1,0,0,0,0,0,1,0})[c:GetSequence()+1])
if not pc then return end if not pc then return end
local g=Group.FromCards(c,pc) local g=Group.FromCards(c,pc)
if Duel.Destroy(g,REASON_EFFECT)==2 then if Duel.Destroy(g,REASON_EFFECT)==2 then
...@@ -149,10 +149,10 @@ function c96227613.pencon(e,tp,eg,ep,ev,re,r,rp) ...@@ -149,10 +149,10 @@ function c96227613.pencon(e,tp,eg,ep,ev,re,r,rp)
return c:IsPreviousLocation(LOCATION_MZONE) and c:IsFaceup() return c:IsPreviousLocation(LOCATION_MZONE) and c:IsFaceup()
end end
function c96227613.pentg(e,tp,eg,ep,ev,re,r,rp,chk) function c96227613.pentg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckLocation(tp,LOCATION_SZONE,6) or Duel.CheckLocation(tp,LOCATION_SZONE,7) end if chk==0 then return Duel.CheckLocation(tp,LOCATION_PZONE,0) or Duel.CheckLocation(tp,LOCATION_PZONE,1) end
end end
function c96227613.penop(e,tp,eg,ep,ev,re,r,rp) function c96227613.penop(e,tp,eg,ep,ev,re,r,rp)
if not Duel.CheckLocation(tp,LOCATION_SZONE,6) and not Duel.CheckLocation(tp,LOCATION_SZONE,7) then return end if not Duel.CheckLocation(tp,LOCATION_PZONE,0) and not Duel.CheckLocation(tp,LOCATION_PZONE,1) then return end
local c=e:GetHandler() local c=e:GetHandler()
if c:IsRelateToEffect(e) then if c:IsRelateToEffect(e) then
Duel.MoveToField(c,tp,tp,LOCATION_SZONE,POS_FACEUP,true) Duel.MoveToField(c,tp,tp,LOCATION_SZONE,POS_FACEUP,true)
......
...@@ -14,7 +14,7 @@ function c96802306.initial_effect(c) ...@@ -14,7 +14,7 @@ function c96802306.initial_effect(c)
end end
function c96802306.thcon(e,tp,eg,ep,ev,re,r,rp) function c96802306.thcon(e,tp,eg,ep,ev,re,r,rp)
local seq=e:GetHandler():GetSequence() local seq=e:GetHandler():GetSequence()
local pc=Duel.GetFieldCard(tp,LOCATION_SZONE,13-seq) local pc=Duel.GetFieldCard(tp,LOCATION_PZONE,({1,0,0,0,0,0,1,0})[seq+1])
return pc and pc:IsSetCard(0xc8) return pc and pc:IsSetCard(0xc8)
end end
function c96802306.filter(c) function c96802306.filter(c)
...@@ -22,7 +22,7 @@ function c96802306.filter(c) ...@@ -22,7 +22,7 @@ function c96802306.filter(c)
end end
function c96802306.thtg(e,tp,eg,ep,ev,re,r,rp,chk) function c96802306.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
local pc=Duel.GetFieldCard(tp,LOCATION_SZONE,13-c:GetSequence()) local pc=Duel.GetFieldCard(tp,LOCATION_PZONE,({1,0,0,0,0,0,1,0})[c:GetSequence()+1])
if chk==0 then return Duel.IsExistingMatchingCard(c96802306.filter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(c96802306.filter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end
local g=Group.FromCards(c,pc) local g=Group.FromCards(c,pc)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,2,0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,2,0,0)
...@@ -31,7 +31,7 @@ end ...@@ -31,7 +31,7 @@ end
function c96802306.thop(e,tp,eg,ep,ev,re,r,rp) function c96802306.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end if not c:IsRelateToEffect(e) then return end
local pc=Duel.GetFieldCard(tp,LOCATION_SZONE,13-c:GetSequence()) local pc=Duel.GetFieldCard(tp,LOCATION_PZONE,({1,0,0,0,0,0,1,0})[c:GetSequence()+1])
if not pc then return end if not pc then return end
local dg=Group.FromCards(c,pc) local dg=Group.FromCards(c,pc)
if Duel.Destroy(dg,REASON_EFFECT)~=2 then return end if Duel.Destroy(dg,REASON_EFFECT)~=2 then return end
......
...@@ -14,7 +14,7 @@ function c97024987.initial_effect(c) ...@@ -14,7 +14,7 @@ function c97024987.initial_effect(c)
end end
function c97024987.thcon(e,tp,eg,ep,ev,re,r,rp) function c97024987.thcon(e,tp,eg,ep,ev,re,r,rp)
local seq=e:GetHandler():GetSequence() local seq=e:GetHandler():GetSequence()
local pc=Duel.GetFieldCard(tp,LOCATION_SZONE,13-seq) local pc=Duel.GetFieldCard(tp,LOCATION_PZONE,({1,0,0,0,0,0,1,0})[seq+1])
return pc and pc:IsSetCard(0xc8) return pc and pc:IsSetCard(0xc8)
end end
function c97024987.filter(c) function c97024987.filter(c)
...@@ -22,7 +22,7 @@ function c97024987.filter(c) ...@@ -22,7 +22,7 @@ function c97024987.filter(c)
end end
function c97024987.thtg(e,tp,eg,ep,ev,re,r,rp,chk) function c97024987.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
local pc=Duel.GetFieldCard(tp,LOCATION_SZONE,13-c:GetSequence()) local pc=Duel.GetFieldCard(tp,LOCATION_PZONE,({1,0,0,0,0,0,1,0})[c:GetSequence()+1])
if chk==0 then return Duel.IsExistingMatchingCard(c97024987.filter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(c97024987.filter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end
local g=Group.FromCards(c,pc) local g=Group.FromCards(c,pc)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,2,0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,2,0,0)
...@@ -31,7 +31,7 @@ end ...@@ -31,7 +31,7 @@ end
function c97024987.thop(e,tp,eg,ep,ev,re,r,rp) function c97024987.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end if not c:IsRelateToEffect(e) then return end
local pc=Duel.GetFieldCard(tp,LOCATION_SZONE,13-c:GetSequence()) local pc=Duel.GetFieldCard(tp,LOCATION_PZONE,({1,0,0,0,0,0,1,0})[c:GetSequence()+1])
if not pc then return end if not pc then return end
local dg=Group.FromCards(c,pc) local dg=Group.FromCards(c,pc)
if Duel.Destroy(dg,REASON_EFFECT)~=2 then return end if Duel.Destroy(dg,REASON_EFFECT)~=2 then return 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